I am using the CY8CKIT-062-BLE and currently working with the S25FL512S.
I have two separate codes which one is used to write sound files to the memory and the second is for playing the sound files from memory.
The first code erases the entire flash memory then, using usb-uart, writes sound files to the memory.
The second code which I flash after the first one, plays the sound very similarly to how the sample "Voice recorder" demo works. (nothing is written or erased at this point; only read).
I have run into a really strange issue where the second piece of code, eventually seems to brick the S25FL. In the sense that the data is completely wrong.
If I try to re-flash the first piece of code and run it, it doesn't even get passed EraseMemory(). It loops forever inside the function in the blocking "Memslot_IsBusy" loop.
It is worth noting that I was working on displaying graphics at the same time and ran into stack/heap issues during development due to the size of the graphics and sounds. I was not able to solve the issue since the memory got bricked during development.
I swapped out the S25FL after this happened and it seemed to work again. Until a few hours later the same thing happened.
Anyone have any clue as to what's going on or what I should be looking at?
Please clarify the following:
Would you be able to share your project?
I don't believe it is using an external frame buffer but I'm not 100% sure since I did use the CE222221 as starter code. It is however, heavily modified from what it was originally. I am trying to use dynamic memory allocation for the images and global/static array for the sound.
The way I'm displaying the images is as follows:
This process happens maybe 3-5 times in a loop to compose the screen out of many images
The way the sound is working is basically the same as would normally work in the example. However there is no "recording" of sounds or anything like that. Simply reading a pre-written sound from external memory into the rxBuffer and allowing the task to do it's thing just like in the example.
The two operations are in separate tasks.
As mentioned, I am facing issues with the local memory. Seems when I am changing images while already playing sound, the sound can get distorted and in some cases, the software can crash (sound is loud and horrible, image freezes mid-draw).
I am aware that I definitely have some kind of a heap issue, I have tried increasing the size of the heap in FreeRTOSConfig but to no avail. I am still in the process of working the local memory issue out, I will be receiving and replacing new memory chips today and investigating further.