InitAudio() problem

Writing software that controls the system and peripherals such as displays, SD cards, Buttons, LEDs, Serial Ports etc.
HeLiO
Senior User
Posts: 94
Joined: Thu 2011-04-14 12:47

InitAudio() problem

Post by HeLiO » Tue 2011-05-03 13:14

Hi!
When i try to load code ti EEPROM lc_25640 to boot wit hit further, everything goes ok and programs runs good (playing files from sdhc card). When i try to use UART , i put obligotary function : InitAudio(); /* goto 3.0x..4.0x */ as shown in yr example, and since that moment sudddenly problems started to appear. I have my source file compiled good also as pro_25lc640. Then i use writing EEPROM via uart - programming goes well until i receive invalid boot record , readed from SPI EEPROM. IT IS aslways INvalid when i put InitAudio(); /* goto 3.0x..4.0x */ this fucntion and always VALID wheen i exclude it.. Im stuck and cant guess anymore wha tit can be// tnx for Help



some add-l info; i have VS1000b , total code of source file = ~ 1892 words , and i managed to program EEPROM with InitAudio(); /* goto 3.0x..4.0x */ several times - VS worked fine , passed all the tests. Suddenly it stared to put out such in valid boot record...
Peter

HeLiO
Senior User
Posts: 94
Joined: Thu 2011-04-14 12:47

Re: InitAudio() problem

Post by HeLiO » Wed 2011-05-04 10:07

still waiting for support answer... tnx

HeLiO
Senior User
Posts: 94
Joined: Thu 2011-04-14 12:47

Re: InitAudio() problem

Post by HeLiO » Wed 2011-05-04 10:32

Just figured out some interesting thing. when i exlude from my project abour 1/4 of code, eeprom programs well and program started on VS1000b.. Very strange, i have 25LC640 eeprom 64 kbit and it seems not to have enough space to hold all my code memory while(!) compilator (via build source.c) says its ok and shows ~ 1900 words... It s really a problem now..

HeLiO
Senior User
Posts: 94
Joined: Thu 2011-04-14 12:47

Re: InitAudio() problem

Post by HeLiO » Wed 2011-05-04 17:02

And another problem - different one and the same global as previous.
I have GPS module installed via UART, and i get and parse NMEA messages from it. BAUD rate is 4800.
I dont use UART interrrupt cause it gets stucked every time on 20-30 sec of working, so i monitor UART status in MyIdleHook all the time. Everything is fine , i im getting full NMEA messages and parse them, but when i have audio playing, all cycle fails, cause MyIdleFunc is not being called as fast as without audio -- so i cant get even single complete NMEA message to control playing or stopping of audio file.. Real problem it is , i think uadio decoding and playing takes too much resources.. If there is any trick to avoid this problem you know or can advice me?

Tnx for answer, Peter

User avatar
Panu
VLSI Staff
Posts: 2782
Joined: Tue 2010-06-22 13:43

Re: InitAudio() problem

Post by Panu » Thu 2011-05-05 10:03

Hi!

> MyIdleFunc is not being called as fast as without audio

That's right. I think you must use UART interrupt.

> I dont use UART interrrupt cause it gets stucked every time on 20-30 sec of working

Seems it should be fixed... be sure not to have the main thread working on any shared variables when the interrupt is running (protect main code with Disable()..Enable() pair).

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

HeLiO
Senior User
Posts: 94
Joined: Thu 2011-04-14 12:47

Re: InitAudio() problem

Post by HeLiO » Thu 2011-05-05 13:27

Tnx for answer. Still have the problems with UART but ill try to progtam GPS to send messages not so fast.. think it will solve the problem.
And you forgot to read the first problem i think.. about EEPROM

Tnx, Peter

User avatar
Panu
VLSI Staff
Posts: 2782
Joined: Tue 2010-06-22 13:43

Re: InitAudio() problem

Post by Panu » Thu 2011-05-05 14:01

Hi!

The EEPROM holds not only the program code words,but also the X and Y constants, so the EEPROM image size is bigger than just the code words. Please check the eeprom image size (made by coff2boot.exe)

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

HeLiO
Senior User
Posts: 94
Joined: Thu 2011-04-14 12:47

Re: InitAudio() problem

Post by HeLiO » Thu 2011-05-05 15:42

Tnx , problem is in img file really.. Constants take ~ 200 words so thats why i havent enough space to hold all the code. By the way, is it possible to do overlays using OWN developers board (simply RS 232 + VS1000b) with uart programming..? If the answer is positive, where i can see the variants of doing this.. Tnx, Peter

User avatar
Panu
VLSI Staff
Posts: 2782
Joined: Tue 2010-06-22 13:43

Re: InitAudio() problem

Post by Panu » Thu 2011-05-05 16:09

By the way, is it possible to do overlays using OWN developers board (simply RS 232 + VS1000b) with uart programming..? If the answer is positive, where i can see the variants of doing this..
Hmmh, by definition, overlays cannot be loaded thru uart, since the whole idea is that the softare is bigger than the on-chip memory and stored externally, and the software loads parts of itself from external storage as needed. But of course the external storage can be prommed using uart. All examples apply to own developer boards as well, but you need a serial storage (SPI EEPROM or FLASH) on your board to store the program.
-Panu

PS. Hmm..mmhmmmhmh... it would be theoretically conceivable that the LoadOverlay function might request the PC to upload an overlay thru UART... It would be very very slow, but possible...
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

HeLiO
Senior User
Posts: 94
Joined: Thu 2011-04-14 12:47

Re: InitAudio() problem

Post by HeLiO » Fri 2011-05-06 19:52

The idea is not in UART debugging with overlays but in UART programming the SPI FLASH in 64 kb for example. I load 3000 words of code in SPI EPROM and then using overlays take them to code memory of vs1000b when needed.. this is the idea i meant

Post Reply