Skip to main content
LTim.2
Associate
December 15, 2020
Question

Writing data to flash STM32L476RE

  • December 15, 2020
  • 2 replies
  • 1302 views

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!

This topic has been closed for replies.

2 replies

Peter BENSCH
Technical Moderator
December 15, 2020

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.
LTim.2
LTim.2Author
Associate
December 15, 2020

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

Peter BENSCH
Technical Moderator
December 15, 2020

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.
LTim.2
LTim.2Author
Associate
December 16, 2020

Page don't blocked

LTim.2
LTim.2Author
Associate
December 16, 2020

0693W000006FuC2QAK.png