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

pstorage_update call MCU reset

My custom board, it connected with App, App sends a command to the board and the board keeps the command in the flash, but when i call the "pstorage_update", it will cause reset.

My code is as follow: is there any wrong? Thanks!

nv_write(0,buf,16);

uint32_t nv_write(uint8_t block_index, uint8_t* buf,uint16_t len) {

uint32_t ret;

nv_status = NV_BUSY;

pstorage_handle_t dest_block_id;

pstorage_block_identifier_get(&g_block_id,block_index, &dest_block_id); pstorage_clear(&dest_block_id,16);

ret = pstorage_update(&dest_block_id,buf,len,0);

return ret;

}

Parents Reply Children
No Data
Related