cancel
Showing results for 
Search instead for 
Did you mean: 

AN 2557(IAP using USART)

smart
Associate II
Posted on January 31, 2008 at 17:30

AN 2557(IAP using USART)

1 REPLY 1
smart
Associate II
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();

}