How to read/write from external memory in RiverDI RVT50HQSNWN00 module for OTA update
Hello,
I am facing the below scenario in my development board. I am trying to do OTA update in my RIverDI 5 inch display module. I receive the firmware chunk from the ESP board which is connected through the external connectors of the riverDI module and through USART1. The USART1 receives the firmware elf chunks and I need to store them in the STM32. The size of my elf file is more than 3MB and I cant directly store the data in the internal flash memory. The only option that I have right now is the external memory, but I am unable to read/write from it.
When I looked through the internet, it was not suggested to write into the external memory since it is allocated for storing the TouchGfx Assets. But my only option is to store the elf file chunks in the external memory and use the same for the OTA update process.
This is what I tried to do in my appliation.
1. Initialized the OSPI in main
MX_OCTOSPI1_Init();
2. Made sure the Memory mapped more is enabled and the API response for OSPI_NOR_EnableMemoryMappedMode() is 0
3. Called memcpy() to write a simple string into the external memory location
memcpy( (uint8_t *)0x91000000, "hello", 5);
I receive a hardfault handler error when I call the memcpy(). Can you please let me know what am I doing wrong here?
Regards
RiverDI user
