AnsweredAssumed Answered

Flash Memory: crash on write access

Question asked by keepcoding on Oct 7, 2013
Latest reply on Oct 8, 2013 by Clive One
Hi

I'm trying to write to the Flash ROM on my STM32F3 board (256k). Erasing a page works fine, but when I try to write a word (or half word), the MCU crashes. 
I'm doing what the standard peripheral library suggests:

FLASH_Unlock();
FLASH_ErasePage(0x0803f800);
FLASH_ProgramHalfWord(0x0803f800, 0x0001);      // crash!
FLASH_Lock();

What am I doing wrong? 

Btw, the CPU speed is 72 MHz and the Flash is configured accordingly:
FLASH->ACR = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY_1;

I'm using Keil uVision to install the program on the flash memory (start address is 0x08000000). Vector table offset is 0x0.

Outcomes