fstorage callback not called

I am trying to use fstorage with the sd backend (SDK 14.0.0). My issue is that, after successfully calling nrf_fstorage_write, the callback I registered using

Fullscreen
1
2
3
4
5
6
7
8
NRF_FSTORAGE_DEF(nrf_fstorage_t m_storage) =
{
.evt_handler = fs_evt_handler,
// addresses taken from linker script
// which in turn takes those from the bootloader start
.start_addr = (0x00075000 - (4 * 0x1000)),
.end_addr = (0x00075000 - (3 * 0x1000))
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

just never called.

This leaves me with two questions:

1. What reasons might there be for my fstorage callback to not get called?

2. Can multiple modules register SD observers using NRF_SDH_BLE_OBSERVER with the same priority, or does every observer need to have its own priority?

Thanks!

Parents
  • Hello,

    Does your project include the nrf_sdh_soc.c source file? This module is responsible for propagating the FLASH and other SoC events to registered NRF_SDH_SOC_OBSERVERs such as the nrf_fstorage_sys_evt_handler() in nrf_fstorage_sd.c.

    2. Can multiple modules register SD observers using NRF_SDH_BLE_OBSERVER with the same priority, or does every observer need to have its own priority?

    Yes, this is not a problem if you don't care about which order the observers are called.

    Best regards,

    Vidar

  • I am not quite sure atm the moment. Would my project even link without nrf_sdh_soc.c?

  • Yes, that is the problem, is completely decoupled from the other code, so you won't get any linker errors if you forget to include it.

  • That is unfortunate...

    Anyway, thanks, I'll try it out!

Reply Children
No Data