Hi , Panu,
Attaching another disk than the SPI flash System Disk (for example Nand Flash, ramdisk or SD card) to USB at boot time (for file upload from a PC) is now handled by pressing [S1] and [S2] together at the developer board.
Thanks. This is a perfect solution for field testing.
Regarding an apparent problem noted in two other different threads but seemingly still connected to the upcoming 3.20 release:
Unable to play any mp3 files using mp3gui.ap3
Version 3.12+ SD including Henrik's SimpleMp3Recorder with VU Meter and libraries.
Controlling MP3 playback: a Model-View-Controller approach
The very first executable in .AP3 file is a string -static char- array of 70 button text labels used for dynamic button name/function changes such as switching from Play Line In
to Rec Line In
. This work great until a decoder or encoder is executed. The music plays but after running either endode or decode StartTask, the first 5 button cap texts gets corrupted with garbage. The application can still run because the button functions are called from a different array of function pointers much later in the code listing. The corrupted strings get changed again each time I call StartTask. Board reset restores char array - obviously.
I did notice strange behavior before, but lacking any hardware diagnostic tools, I found no repeatable evidence to give you until after moving the button string array to the head of the program. It only seems to corrupt the first approximately 40 words (chars) of the array (not yet switched to reading 2 chars per word).
Most significant is that the only readable characters that often show up on button caps are ".AP3" - the rest appear as random pixels, so it seems the corruption is coming from the OS level. The corruption appears completely repeatable (disclaimer at end of this post).
Update: I found the repeatable problem: I did not allocate enough chars to a button text string used for user messages and longer ones from the encoder grabbed more memory than I gave it! Unfortunately, the strange behavior after calling StartTask for the decoder is back as before.
In my earlier post, the StdButtons lockups appear to be caused by the same problem. But there I had file pointer declarations at the beginning of the .AP3 file that were being corrupted and would lock up the Dev Board 1.8 and force a reset. Now it just mislabels the button texts.
Update: Now the decoder locks up the Dev 1.8 board when it finishes playing forcing a reset. Seems there is a conflict between playing Line In and Mic In with reading stdaudioin/writing stdaudioout and switching to a different process for encode/decode.
My code is like Henrik's VU Encoder from October except I use the ESRead function also for Line In/Mic In/FM In through DSP (gain, AGC, VU Meter, etc) to Line Out. This Read-DSP-Write loop is my highest priority as sound to the user should not be interrupted when recording stops. Is there a way of splitting this up:
So SD input is defined by: ioctl(stdaudioin, IOCTL_AUDIO_SELECT_INPUT, (void *)(SD | MP3_DECODE));
And SD output is def by: ioctl(stdaudioout, IOCTL_AUDIO_SELECT_OUTPUT2, (void *)(SD | MP3_ENCODE));
OUTPUT2 would be in parallel with Line Out as in Henrik's example. To stop encode/decode, read/write 0 samples. When samples are read again, encode/decode restarts.
If the encode/decode tasks are one level lower, operating as an SD driver plus "Plug-In", the Read-DSP-Right loop remains continuously operable and can be simply operated with global flags. This works perfectly for me right now with other inputs. This selectable input/output is the reason I selected your product.
Code: Select all
Or - I am unconsciously causing this somehow.
But it seems that always when I test it with the engineer who wrote that code, it suddenly works and I can't get it to fail and thus it remains unfixed. Maybe it detects that it's in the same room with the engineer.
I thought I was alone in suffering this paradox. I am continuing to investigate this myself and any ideas you or your crew may have are greatly appreciated.