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

if ble_flash_page_read would lead to BLE connection fails??

In my project,I want to send commands when BLE is connecting to read datas in the nrf51822 internal flash which were writen into the flash previously , but I found the ble_flash_page_read would interrupt the BLE connection. so I want to know if the ble_flash_page_read would lead to the BLE connection fails ? my softdevcie version is s110_nrf51822_5.2.1 ,SDK version is nrf51_sdk_v4_3_0_27417.

Parents
  • A flash page read should not be able to cause any problems, as that's basically no different from what's always happening. However, you need to make sure that you pass correct parameters to this function, since unaligned access will cause a HardFault on an ARM Cortex M0 (i.e. accessing addresses directly that is not aligned at a word (4 byte) boundary). I suspect this may be the problem here.

    What do you see if you run the project in the debugger?

    Also, I'd strongly recommend you to upgrade to softdevice 6.0.0 and SDK 5.0.0, which provides native flash APIs.

Reply
  • A flash page read should not be able to cause any problems, as that's basically no different from what's always happening. However, you need to make sure that you pass correct parameters to this function, since unaligned access will cause a HardFault on an ARM Cortex M0 (i.e. accessing addresses directly that is not aligned at a word (4 byte) boundary). I suspect this may be the problem here.

    What do you see if you run the project in the debugger?

    Also, I'd strongly recommend you to upgrade to softdevice 6.0.0 and SDK 5.0.0, which provides native flash APIs.

Children
No Data
Related