Menu

#83 Support of OBL_LAUNCH

none
Fixed
nobody
None
Medium
Patch
2016-02-08
2016-02-02
Ernst
No

As discussed in https://my.st.com/3077d1fa, the bootloader requires
an odd (Thumb mode) address for the GO command. If an even address
is used, the Cortex M does something like a software reset, but this
is not generated by the write to AICR in stm_reset_code, but by an
exception due to the even address which is not compatible with
Thumb mode. ARM specifies 'Hard Fault' for this case:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/BABDCDHA.html

On some devices, when programming an initially
blank device, -R will reenter the bootloader
unless the OBL_LAUNCH bit in FLASH_CR is set.
Refer to RM0360, section 2.5 "Empty Check".
The STM32F030xC device is marked in the device
table to use the OBL_LAUNCH reset.

2 Attachments

Discussion

  • Tormod Volden

    Tormod Volden - 2016-02-03

    Your st.com link only gives a login page, do you have the correct link? Anyway, AN3155 explains the GO command and I agree the code execution address stored at the "go address" + 4 must be an odd address.

    I am just surprised this was wrong because I had tested it with a hardware debugger when fixing alignment issue in https://sourceforge.net/p/stm32flash/code/ci/1381ff50f11706e746c28008eed6561c592fccf5 :)

     
  • Tormod Volden

    Tormod Volden - 2016-02-08
    • status: New --> Fixed
     
  • Tormod Volden

    Tormod Volden - 2016-02-08

    Thanks! I have pushed both patches to git.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB