This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pstorage_handle_t is lost in BLE NUS data event

why m_storageHandle_DeviceName became to 0xFFFFFFFF, its value was init by pstorage_register when app startup, but here it lost value. Can anybody help me ?

// event on receiving data from ble uart service
static void on_nus_data_evt(ble_nus_t * p_nus, uint8_t * p_data, uint16_t length)
{
    uint32_t err_code = 0;
    if (p_data != NULL && length > 0)
    {
        err = pstorage_clear( & m_storageHandle_DeviceName, 
                                       DEVICE_NAME_LENGTH*4);
	APP_ERROR_CHECK(err);
    }
}
Parents
  • It's 0xFFFFFFFF right before calling pstorage_clear()? Not after?

    Do you have on_nus_data_evt() and pstorage_register() in the same file? Or pstorage_register in main and on_nus_data_evt() in ble_nus.c or somewhere else?

    Show your code so I can check it.

Reply
  • It's 0xFFFFFFFF right before calling pstorage_clear()? Not after?

    Do you have on_nus_data_evt() and pstorage_register() in the same file? Or pstorage_register in main and on_nus_data_evt() in ble_nus.c or somewhere else?

    Show your code so I can check it.

Children
No Data
Related