Copy RAM to FLASH
Hello everyone!
I am trying to copy RAM data to FLASH. I am using STM32L412KB evaluation module. I have made a USB of my own. I am able to talk over the USB. It's a 34Kb mass storage device. I can make a .txt file and store it but, every time I connect the USB after power cycle, it has to be formatted as everything is in the RAM. Basically, I want my USB to use the FLASH storage instead of RAM. So, there's 2 things here that I have to figure out.
Firstly, I'll connect my USB to the computer, make a .txt file and save it. Now, I'd copy the entire RAM to FLASH through a memcpy or something. HOW?
Secondly, I'll want my USB to use Flash storage instead of RAM. With flash having all the RAM data, it'll now be able to retain data after power cycle. HOW?
Thank you!
