Hi,
my setup is the following:
- SDK 2.6.3
- nRF5340
- Low power management for external flash enabled
- Logging enabled (based on littleFS)
- external flash used to store continuously data
With this configuration i am observing an exponential increase of booting time due to the introduction of the the entry to and exit from low power of the external flash as defined in the file \v2.6.3\zephyr\drivers\flash\spi_nor.c.
The characteristic of my external flash for entry and exit the deep sleep mode are the following:
- 30us to enter in Deep Power down mode
- 10us to exit Deep Power down mode
Those values are rounded up to 1 ms each by the defines in \v2.6.3\zephyr\drivers\flash\spi_nor.c
#define T_RES1_MS DIV_ROUND_UP(DT_INST_PROP(0, t_exit_dpd), NSEC_PER_MSEC) #define T_DP_MS DIV_ROUND_UP(DT_INST_PROP(0, t_enter_dpd), NSEC_PER_MSEC)
1. Why the need to convert in milliseconds those delays (in the specific case, causing an increase between 30 and 100 times) ?
2. For such kind of microseconds delay would not be better to use even a blocking delay like NRFX_DELAY_US ? (I have modified the spi.nor file and seems to work properly)
3. Is there a way - even i looked for but could not find it - to enable the power management for the external flash at runtime ? So in my case, it would be disabled at the boot up and once done, it gets enabled.
4. Eventually, could this change be considered in the future version of sdk ?
Thanks in advance for your support.
Kind regards
Riccardo Gaiati