2022-04-14 12:11 PM
I've hit the limit of my research and don't have any experience writing to flash other than at compile time using the keyword 'const', but that doesn't help me because I need to be able to continuously write data. I have a very basic and general sense of what a page and bank is, and just need some help getting started trying to find out how to go about doing this.
I'm trying to implement a double buffering mechanism, but to have it stored in flash because my application does not have enough RAM to dynamically allocated what it needs during the worst case.
I simply need to write 8-bits of audio sample data in two buffers at 8khz, so every second, I need to be able to page in one second's worth (8 KB) of samples to process while DMA is writing to the other 8 KB buffer.
Is this even possible?
I don't understand what it takes to be able to erase a bank and write to it, but I feel like it might be complicated, and I'm willing to learn. From what I hear, the read/write cycle is slow, but I'm not sure how slow and don't even know where in the data sheet to find the information that would answer this question. It's a deluge of information that doesn't apply to what I'm looking for, and sort of difficult to find the relevant information. Can anyone help point me in the right direction?
Thank you!
2022-04-19 08:11 AM
Hello,
If you download STM32Cube_FW_WL_V1.2.0 on ST website, you could find under \Projects\NUCLEO-WL55JC\Examples\FLASH examples to write and erase FLASH memory.
You can also refer to the datasheet RM0453, section 4, Embedded Flash Memory. Concerning the timing to program the flash, on section 4.3.8, Flash main memory programming sequences, you could learn more about the Fast Programming ! (there is also an example related to Fast Programming)
I hope I could help you !