Question
Hard Fault Writing Flash
Posted on March 28, 2014 at 16:11
Hi,
i'm trying to create a bootloader into the component STM32f106RDT with 384KO of Flash. I have mapped the memory like this: 0x08000000 - 0x0802FFFF for main software (first binary) 0x08030000 - 0x08030FFF for bootloader that will copy second part to first part 0x08031000 - 0x0805FFFF for the temp binary (second binary) My binary file size is 60KO. So I can't copy my new binary file into the RAM, this is why I will use the secondary party of memory flash. I'm receiving datas by serial com at 115200bps with interrupt by packet of 400bytes. The page size is 2048bytes. And i need I erase well all needed pages. My problem is that i'm writing well the first 102 frames of 400bytes into the flash at adress 0x80301000 but after this the chipset go in the Hard Fault interruption ( HardFault_Handler ). I can't follow the call stack because there is'nt. I need to copy 50 more frames. The USART interrupt is low at 5, and I have a scheduler with higher priority. I'm using Keil environment with ULINK2. Do somebody have a solution or way to analyze this problem? Thank You #hard-fault-stm32