Flash not read/writeable when booted from flash

2 posts / 0 new
Last post
Last seen: 8 months 2 days ago
Joined: 2017-01-25 09:29
Flash not read/writeable when booted from flash

Hi all,

I have finished my application. It is based on the ble_app_peripheral example from the SDK. I added spi_flash_read and spi_flash_write from the spi_flash example code.
Everything is working when the program is booted from RAM, booting from Keil. However when I burn the hex file to flash with smartsnippets (and click yes in the popup where it ask to make it bootable) the application does not fully work anymore. When I've come to the point in software where the application wants to read or write from or to flash, a timeout is generated in spi_flash_read or spi_flash_write, and the watchdog is triggered. Let me stress that this issue does not come up when the exact same application boots from RAM.

I've used the secondary bootloader to generate a bootable hex file for my application as well and burned that with smartsnippets (and clicked no on the popup, not making it bootable), but this gives me the same problem. Whenever the application boots from flash, I can't use the flash in my application anymore.

I would really like to hear a solution for this.

Kind regards,

Last seen: 3 days 18 hours ago
Joined: 2015-06-08 11:34
Hi Niekvdd,

Hi Niekvdd,

There is a function in order to place the spi in power down mode and in that case you wont be able to interact with the flash unless you instruct the spi to be powered up. So please try to invoke the spi_flash_release_from_power_down() before starting to interact with the flash.

Thanks MT_dialog