Skip to main content
richardknoop39
Associate
January 12, 2010
Question

Function pointer to fixed address

  • January 12, 2010
  • 3 replies
  • 987 views
Posted on January 12, 2010 at 05:21

Function pointer to fixed address

    This topic has been closed for replies.

    3 replies

    ericvanolden9
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 13:37

    Hello,

    You must use an odd address.

    Try uaMain = (void(*)(void))0x08004005L;

    This is due to old ARM7/ARM9 architecture with Thumb and Arm instructions. With Cortex-M3 all intsructions are Thumb and you must set bit 0 to jump to a Thumb instruction.

    Eric

    richardknoop39
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 13:37

    Hi,

    I am trying to call a function on fixed address, but it ends in the MemManage_handler, when calling my function pointer

    I am using the Keil compiler and a STM32F107.

    My code is:

    Code:

    <BR>void (*uaMain)(void); <BR>uaMain = (void(*)(void))0x08004004L; <BR>(*uaMain)(); <BR>

    Can anyone help me?

    [ This message was edited by: richard.knoop on 11-01-2010 16:59 ]

    richardknoop39
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 13:37

    Hi,

    you are right, it now jumps to the correct code :D .

    Thanks,

    Richard

    [ This message was edited by: richard.knoop on 12-01-2010 10:07 ]