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

pstorage fails after disconnecting

Hello,

I am trying to write data to flash with the pstorage api. I managed successful to write data to flash with the pstorage_test_store_and_update() function from the example of this thread.

case BLE_GAP_EVT_DISCONNECTED:

    m_conn_handle = BLE_CONN_HANDLE_INVALID;

    Flash_WriteData();

    /* Start advertising */
    GAP_Start_Advertising(ADVERTISE_WHITELIST);

    break;

When I call the function in my main function it does work, but when I call it after a disconnect the pstorage callback function is not being called anymore, so my programs hangs.

Do you have any suggestions for this problem?

Thanks.

Related