Skip to main content
smart
Associate III
January 31, 2008
Question

AN 2557(IAP using USART)

  • January 31, 2008
  • 1 reply
  • 538 views
Posted on January 31, 2008 at 17:30

AN 2557(IAP using USART)

    This topic has been closed for replies.

    1 reply

    smart
    smartAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:22

    Hello STone-32,

    I have a question regarding source code of AN 2557(IAP using USART)

    In the source code file main.c what is the idea behind to check the

    Flash if it is already programmed.

    How do we know that this value will always be 0x20000000

    for any software.

    code is here:

    /* Test if user code is programmed starting from address ''ApplicationAddress'' */

    if (((*(vu32*)ApplicationAddress) & 0x2FFF0000 ) == 0x20000000)

    {

    /* Jump to user application */

    JumpAddress = *(vu32*) (ApplicationAddress + 4);

    Jump_To_Application = (pFunction) JumpAddress;

    /* Initialize user application's Stack Pointer */

    __MSR_MSP(*(vu32*) ApplicationAddress);

    Jump_To_Application();

    }