Writing data to flash STM32L476RE
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!
