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

Flash write

Hello,

I'm trying to write value to a specified address with ble_flash_page_write .

I'm using ble_flash_page_write after ble disconnect event. I've tested different page address to be sure i'm not writing on application or s110 areas and page address are multiples of 4.

At execution, an Hard fault occur at the ble_flash_page_write line... Any idea about this error ? Is there others solutions to write values to a precise flash address ?

int32_t page = 200;
uint8_t word_count = 1;
uint32_t data_array[2]={0x81ABACAB};
data_array[1] = 0x81ABACAB;
		
err_code = ble_flash_page_write(page,(uint32_t *) &data_array,1);
APP_ERROR_CHECK(err_code);
Parents
  • Hi Thomas,

    To give you an example, lets say you want to share bond information from application to boot-loader. Then this is what can be done:

    a. Ensure that pstorage_platform file has been provided with same start address. Number of applications and end address could be adjusted if you need more persistent memory in boot-loader mode. b. Register bond related blocks in same order as in application mode once pstorage has been initialized.

    If this is done, and your bootloader is not overriding or clearing any of flash pages reserved for storing data persistently, you should be able to share information from application to bootloader.

    Regards, Krishna

Reply
  • Hi Thomas,

    To give you an example, lets say you want to share bond information from application to boot-loader. Then this is what can be done:

    a. Ensure that pstorage_platform file has been provided with same start address. Number of applications and end address could be adjusted if you need more persistent memory in boot-loader mode. b. Register bond related blocks in same order as in application mode once pstorage has been initialized.

    If this is done, and your bootloader is not overriding or clearing any of flash pages reserved for storing data persistently, you should be able to share information from application to bootloader.

    Regards, Krishna

Children
No Data
Related