wait_for_flash_ready not working when device is connected to BLE.

I am using fstorage to store some data at three location in flash.

rc = nrf_fstorage_erase(&fstorage,0x3e000,1,NULL);
    APP_ERROR_CHECK(rc);
    wait_for_flash_ready(&fstorage);

    rc = nrf_fstorage_write(&fstorage, INIT_DONE_LOC, &m_data, sizeof(m_data), NULL);
    APP_ERROR_CHECK(rc);
    wait_for_flash_ready(&fstorage);

    rc = nrf_fstorage_write(&fstorage, PUFF_COUNT_LOC, &init_value, sizeof(m_data), NULL);
    APP_ERROR_CHECK(rc);
    wait_for_flash_ready(&fstorage);
    //wait_for_flash_ready(&fstorage);

    rc = nrf_fstorage_write(&fstorage, FLASH_FULL_LOC, &init_value, sizeof(m_data), NULL);
    APP_ERROR_CHECK(rc);
    wait_for_flash_ready(&fstorage);



but it is hanging at wait_for_flash_ready function when mobile phone is connected through BLE.

Please help.

Parents Reply Children
No Data
Related