Fastest method to transmitt huge chunck of data from app to flash
Hi all,
I need a dual bank firmware update to meet some requirements. I have a STM32WB55 with 1MB of flash which is seperated in 3 sections of 300kb (ble, appliciation and an update stack) + bootloader. I can do a firmware update and now im trying to speed up the transmission process.
Currently im sending the binary to the update stack. My ble service sends 4 bytes header with 16 bytes of data and directly safe the data on flash using HAL_FLASH_Program and a semaphore (required for bluetooth connection see ble_RfWithFlash). Because programming flash is pretty slow, 5.5 ms for double word, so > 11ms per message, it takes a long time to transfer the entire binary...
What would be a good way to improve this timewise? I came up with a two solution but dont know what is the best approach and what the advantages and disadvantages would be.
- Create a buffer of one page and use fast program to program one entire page instead of 2 double-words each time(i do have enough free ram)
- Use data length extending for the ble service and send 250 bytes each time
Or if you have another solution please share!
Thanks in advance,