cancel
Showing results for 
Search instead for 
Did you mean: 

How to write into external flash of RiverDI 5" display module

RiverDi_user
Associate III

Hi,

I have a RIverDI 5 inch display where I am trying to update the firmware through OTA. Basically I have a ESP board which receives the Firmware chunk through BLE and I need to store the chunks in the STM32. Unfortunately my application elf is of size 4MB+ and I cant store the chunks in the internal flash as the total flash memory size is of 4MB. Currently the application code is written into Internal flash and Touchgfx files and image files are written into the external flash when I update the FW through ST-Link, I need to achieve the same in my OTA aswell. Is there any working example for me to implement this? Initially I wanted to store some data in the external memory, could anyone point out some code example for the same?

 

Regards

RiverDi User

3 REPLIES 3

@RiverDi_user wrote:

Unfortunately my application elf is of size 4MB+


The size of an ELF file is not the same as the size of the code it represents - the file is (much) bigger.

 


@RiverDi_user wrote:

Is there any working example for me to implement this?


Have you asked Riverdi?

The size of an ELF file is not the same as the size of the code it represents - the file is (much) bigger. - Yes, But I am unable to reduce the elf size, any ideas to reduce it?

Have you asked Riverdi? - No, not yet!

You'll need to code QSPI BSP code on the STM32 side to access the device prior to switching to Memory Mapped

If you wrote your External Loader for this platform, you'd have the code already.

For W25Q NOR FLASH, you'll need to use PROGRAM PAGE (0x02), writing 256 bytes at a time, aligned, waiting for the operation to complete, then writing the next page. ie WIP/BUSY in SR1

Prior to writing you must ERASE, typically in 4KB or 64KB blocks, or whole chip. Again wait for those to complete

https://www.pjrc.com/teensy/W25Q128FV.pdf#page=50

Look at ST's examples for the MICRON MT25 chips in the Cube BSP / Component directories

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..