Other Parts Discussed in Thread: UNIFLASH
Hello eveyone,
I have CC2642R1 dev board.
I am using simple peripheral ble-5 example. I am trying to write flash with osal_snv_write() function. I've just put the function in button handler, for each button press function starts writing from the adress which last time it ends to write.
To be more clear;
The code I'm writing is:
uint8_t deneme [] = {
0x11, 0x12, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x21, 0x22, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x31, 0x32, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x41, 0x42, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x51, 0x52, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x61, 0x62, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x71, 0x72, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x81, 0x82, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0x91, 0x92, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0xa1, 0xa2, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0xb1, 0xb2, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0xc1, 0xc2, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0xd1, 0xd2, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f,
0xe1, 0xe2, 0x13, 0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1b,0x1c,0x1d,0x1e,0x1f
};
t = osal_snv_write(0x101, 240, &deneme);
as I said, It's written in button handler function. ( BLE_NVID_CUST_START is defined as 0x100)
When I press button first time, function starts to write 0x48062 flash adress and ends 0x48133. Then when I press button second time, It doesn't start to write 0x48062, I starts to write 0x48152 flash adress. Every time continues like this.
So is it normal? Because my page ID is always 0x101 as you can see. By the way NVS region base adress is 0x48000 in syscfg.