This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FDS not setting event handler properly?

Hi!

I am feeling a bit stupid, since I know that I must have made a config error somewhere. I just don't know where. I am developing a BLE HID device using SDK 16.0 and SD 132. Config has been a breeze, and the device advertises as expected. However, when trying to bond, it just stops the debugger at address 0xA60. After inserting lots of debug info throughout the SDK and isolating the BLE code, I found that m_fs.evt_handler was not properly set (should be on fds.c:70). When checking where it should be called in nrf_fstorage_sd.c:event_send, it was set to some rubbish value, which is what caused the HardFault. When I set m_fs.evt_handler = fs_event_handler; in fds.c:fds_init, it suddenly works. Any ideas why it isn't properly set as is?

Parents Reply Children
  • I created the project from scratch, using the wizard in SES after installing the MDK. The project isn't exactly share-worthy at the time, especially the BLE handling, and in any case it is working after adding that one line to fds.c in the SDK. It would just have been nice if it didn't come back to bite me later if I happened to upgrade to a newer SDK and if it didn't affect other developers. It doesn't seem that others are affected, so it's likely just some setting I've missed. I'll get back to you later either if it doesn't resolve or if I find the problem. Thanks for your responses!

  • It's hard to say what it could be without seeing your project. In general, we highly recommend starting out with one of the example projects and not creating the project from scratch. There is a lot of configs in SES that could cause issues, while the example projects have been generated with correct settings and have been tested by us before the SDK releases.

Related