SAMv71 - flash_write API doesn't work on 0x100000 address

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


I have bought board which has a SAMv71n21b MCU. and I have installed Atmel Studio 7.0 


I want to write my data after 1MB embedded flash area.  (0x100000).

But, The flash_write function only works on the address of 0x3200. 


This is a example code.


#define page_size 512

static uint8_t src_data[page_size];


for (i = 0; i < page_size; i++) {

    src_data[i] = i;



flash_write(&FLASH_0, 0x3200, src_data, page_size); //success. flash data changed.

flash_write(&FLASH_0, 0x100000, src_data, page_size); //return ERR_NONE, but Flash data does not change.



I really do not understand this situation. because flash_write function always return ERR_NONE;

It means flash is not locked.


I analyzed the ASF API, but I could not find any errors.

please help me.