Power down DA14531MOD's SPI 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.
4 posts / 0 new
Last post
innovativepower
Offline
Last seen:1 month 1 day ago
加入:2020-09-07 17:16
Power down DA14531MOD's SPI flash

Hi,

Recently I got the DA14531MOD low power, matching the specified current consumption as stated in the datasheet. For a long time, with every example I tried, the current consumption was around 10uA in deep sleep and hibernation mode. It turns out that the internal SPI flash is not turned off when going in to sleep or hibernation and there's not really any documentation about this as far as I know. Right now I'm using a dirty fix to put the spi_flash_power_down() function somewhere in the arch_set_deep_sleep() and arch_goto_sleep() function. This way the hibernation_mode example code is low power, even between the advertisements, and still working correctly.
However, eventually I want to have the ble_app_sleepmode example code low power, but by copying the fix described above I'm not able to power down the flash. Changing code in sdk is also something I don't like, since you will not be able to update it easily and you can break other things.

Is there a way to power down the flash on the DA14531MOD without modifying the sdk, but still have all the code stored on the flash? Or is there already some example like the ble_app_sleepmode, but then powers down the flash between advertisements?

Thanks,
Martin

PM_Dialog
Offline
Last seen:22 hours 26 min ago
工作人员
加入:2018-02-08 11:03
Hi innovativepower,

Hi innovativepower,

The ble_app_sleepmode example of the SDK is using extended sleep mode between advertising or connection intervals. When the application code is stored to Flash, the code is copied into System-RAM and it boots from there. So, you could call the spi_flash_power_down() in the user_app_on_init() or app_advertise_complete() callback function. There is no need to modify the SDK files. All the implementation should be down in the user application files.

Thanks, PM_Dialog

innovativepower
Offline
Last seen:1 month 1 day ago
加入:2020-09-07 17:16
Hi,

Hi,

Thank you for your answer. Putting the spi_flash_power_down() function inside user_app_on_init() worked immediately in the hibernation_mode example, but not on the ble_app_sleepmode example. To fix that, I copied the initialisation of the flash from the hibernation example to the ble_app_sleepmode and now it works fine.

Thanks,
Martin

PM_Dialog
Offline
Last seen:22 hours 26 min ago
工作人员
加入:2018-02-08 11:03
Hi innovativepower,

Hi innovativepower,

Glad that you are able to put the flash into power down and thanks for the indication. If you have any follow-up question, please raise a new forum thread.

Thanks, PM_Dialog