Question
STM32F2XX Flash PGPERR and PGSERR set just after reset
Posted on April 09, 2013 at 20:35
The specific device: STM32F205RG
Issue: I have a small boot code region that I'm using to jump from 0x0800000 to 0x08020000 the intervening blocks are to be used for static data... Unfortunately once I've jumped to 0x08020000 and start executing (even if I just infinite loop) I end up with the PGPERR and PGSERR bits set and if I clear them they just get reset. Code to make the jump from 08000000 to 08020000:HWM_reset_handler PROC
EXPORT HWM_reset_handler
; Go to boot loader.
ENTRY
ldr r0, =0x08020000
ldr r1, [r0]
msr msp, r1 ; Initialize Stack for boot loader
add r0, r0, #4 ; r0 now has addr of reset handler in boot loader
ldr r0, [r0] ; Load the Reset Handler Address
orr r0, r0, #1 ; Ensure thumb mode
bx r0 ; jump to boot loader image
ENDP
ALIGN
I'm using the RVCT 3.1 compiler and assembler. (RVDS toolchain) So I can't exactly use the ST example libraries except as code examples...
I also attempted to set the flash parallelism before making the jump, but this didn't help. I have a feeling it's not related to my code, as I'm not yet writing flash anywhere, rather related to the tool chain configuration...any ideas?