Flash not read/writeable when booted from flash

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
Niekvdd
Offline
Last seen:1 year 12 months 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.

我真的很想听到一个解决方案。

Kind regards,
Niek

Device:
MT_dialog
Offline
Last seen:3 months 22 hours ago
Staff
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