Skip to main content
tiago
Associate II
April 30, 2010
Question

STM32 and IAR Compiler doubt [SOLVED]

  • April 30, 2010
  • 3 replies
  • 860 views
Posted on April 30, 2010 at 16:40

STM32 and IAR Compiler doubt [SOLVED]

#arm-thumb-stm32-cortex-m3
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    May 17, 2011
    Posted on May 17, 2011 at 13:49

    The low bit of the PC must be set to 1 to indicate the function is in Thumb, the STM32 (Cortex-M3) doesn't support ARM which would have the bit set to 0.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    disirio2
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 13:49

    It is because the STM32 runs thumb code so the least significant bit of a code address must be 1. Trying to jump to an even address would raise an exception because the Cortex-M3 cannot run ARM code.

    Giovanni

    ---

    ChibiOS/RT http://chibios.sourceforge.net

    tiago
    tiagoAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:49

    Thanks a lot guys!