cancel
Showing results for 
Search instead for 
Did you mean: 

Writing data to flash STM32L476RE

LTim.2
Associate II

I use STM32L476RET6 and try write data to flash. I write full page (2K) it's working ecept end page (Page 383) Bank 2.

I calculate addres for page 382 bank 2: 0x0800 0000 + 0x7F000 and correct data to write.

I calculate addres for page 383 bank 2: 0x0800 0000 + 0x7F800 and data no writed. Page cleared.

I use code:

...

...

uint32_t addr = 0x807F800; // Address 383 Pages, bank 2 or 0x807F000 for 382 pages

HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, addr, data[i]);

...

...

I need help on this issue. Any help and hints are appreciated. Thank you in advance!

5 REPLIES 5
Peter BENSCH
ST Employee

What value did you use for parameter data[i] while calling HAL_FLASH_Program?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

In my experiment, I used just the number 0x25 (uint64_t)

Peter BENSCH
ST Employee

Are you sure you didn't accidentally lock the page?

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Page don't blocked

0693W000006FuC2QAK.png