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

after sd_flash_page_erase softdevice does not generate event

Hi,

I managed to get dfu working in application (with hrs). But on the last attempt to erase page with bootloader settings there is no event generated from softdevice and I get stuck on attempt to store new settings. When I added timeout on this operation it works - so flash operation are executed but there is no event. This affects only last operation on bootloader - when I already received whole new image.

sd_flash_page_erase returns 0 and also operation is executed. Just no event.

Any suggestions?

EDIT:

My mistake, it has something to do with RTOS scheduler and it is probably bug in my software.

Parents
  • I will post my solution for those will run into it in the future. Problem was that I was handling ble event from softdevice in which I used sd_flash_page_erase and then I was waiting for sys evt but I was calling getter for those events later in the same thread. So the event was generated I just was blocking myself. Enqueuing call to sd_flash through fs_storage and returning immediately resolved this.

Reply
  • I will post my solution for those will run into it in the future. Problem was that I was handling ble event from softdevice in which I used sd_flash_page_erase and then I was waiting for sys evt but I was calling getter for those events later in the same thread. So the event was generated I just was blocking myself. Enqueuing call to sd_flash through fs_storage and returning immediately resolved this.

Children
No Data
Related