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

Use of pre incrementer in flashwrite example

Hello All,

I was looking at the flash writewrite_example and the starting address is defines as:

addr = (uint32_t *)(pg_size * pg_num);

Later in the code, the example writes to flash using the following function call:

flash_word_write(++addr, (uint32_t)patwr);

This will pass the next address into the example. Does this mean that the starting address is actually:

addr = (uint32_t *)((pg_size * pg_num)+1);

If not, does the example code produce an off by 1 error when reading? I am really just trying to confirm the starting address to write to in the last page in flash. I am going to store some values there.

On a side note, can anyone tell me when the Bond Manager will be used? I don't believe I using it, unless it is called under the hood by the softdevice code.

Related