AnsweredAssumed Answered

STM32F2XX Flash PGPERR and PGSERR set just after reset

Question asked by Echelon_Force on Apr 9, 2013
Latest reply on Sep 17, 2014 by ghislain.olivier
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?

Outcomes