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

NRF52 PM_EVT_ERROR_UNEXPECTED problem with connection

hello,

I used nrf52 and softdevice 2.0.1 and i have a big problem.

For some times the BT works perfectly but after i connect more then 4 devices for some reason the device return PM_EVT_ERROR_UNEXPECTED end stop working. The reset do not help i used sd_nvic_SystemReset() and NVIC_SystemReset() even i trya power off the BT module, but this error still happens

i received this error(PM_EVT_ERROR_UNEXPECTED) every time when i want to connect to a BT module to a phone.

Any ideas what cause this.

  • Do you know where inside the Peer Manager the error originates from? Are you saying that now you are not able to connect to any smart phone? You only get the PM_EVT_ERROR_UNEXPECTED error? What example are you using? Does this happen if you do an erase all, and program the SoftDevice and application again?

  • Inside the Peer Manager some times i see PDB_EVT_RAW_STORE_FAILED then PM_EVT_PEER_DATA_UPDATE_FAILED after that errors try to connect again and the PM_EVT_ERROR_UNEXPECTED comes.

    -Yes i am not able to connect to any smart phone -Yes every second attempt to connect i received this error.

    • I am using the ble_app_multirole_lesc example
    • No, when i erase all everything is normal until for some reason the PM_EVT_ERROR_UNEXPECTED came the error came after BLE_GAP_EVT_CONN_PARAM_UPDATE
  • Are you pairing using LE secure connections? What kind of central devices are you connecting to? iOS or Android? Could you provide a sniffer trace?

  • I spend some more time investigating the code and I noticed strange data in the flash area protected by the bootloader (DFU_APP_DATA_RESERVED(0x76000)). I see that every time when I try to connect a phone, starting from address 0x76C00 strange records appear. These records are about 32 bytes long, look very similar and 1byte of them seems to be incremented. When these records reach address 0x77C00 the errors DB_EVT_RAW_STORE_FAILED and PM_EVT_PEER_DATA_UPDATE_FAILED are triggered.

    I have also noticed that the module pstorage is using this flash area(based on the macros in pstorage_platform.h). Please explain what is this data and why it is written there?

    How we can solve this issue, because I can not recover the BT module after these errors appear?

  • (continued...)

    I am using address(0x76000) for customs settings(80 bytes) since it is protected by the Bootloader, but it seems this is not true, because of the explanation above. So where should I place my customs settings?

Related