cancel
Showing results for 
Search instead for 
Did you mean: 

Need help implementing IAP

kevishu
Associate II
Posted on June 23, 2005 at 02:29

Need help implementing IAP

2 REPLIES 2
kevishu
Associate II
Posted on June 03, 2005 at 20:16

Hi,

I'm kinda new to writing firmware and so I'm stuck with some questions about implementing IAP on the ST72F561. I've read through a bunch of the App Notes and have a basic understanding of the IAP code and how it works. I just don't know how to actually program it.

Here is the basic info about the firmware I am trying to program:

-Sector 2 will contain the main code

-Sector 0 will contain the IAP routine and supporting functions

-External interrupt from PD6 will initiate the IAP process

Basically, I'm not sure how to program the code since part of it has to be in sector 0 and the other part in sector 2. Should I be writing two independant programs (one for each sector) and download each into the ST7 separately? Also, how do I specify my IAP routine to start at location 0xF000 (top of Sector 0)? I understand the interrupt vector specifies this, but I can't find where this is explicitly specified in code (or linker file).

As you can tell, I'm relatively new to this, so please be patient with me. 🙂 If anybody can show me some actual code of this IAP implementation, I'd greatly appreciate it.

Thanks very much,

Scooby

venkateswara
Associate II
Posted on June 23, 2005 at 02:29

Hi,

I suppose that you want to download some code into sector2 and execute that. You can choose to have two different workspaces to make things simple. The first workspace should contain sector0 code which is the IAP driver. The second workspace should contain the code for sector2&1. This will be the target application code.

The interrupts will be mapped in the vector.c file if you are using cosmic compiler.

For the sector1/2 application, you can download the new application firmware using the sector0 driver, but you cannot update the interrupt vector table(located in sector0). For this, you can use a jump table. Place this jump table in the end of sector1.

Your jump table should contain the ISR addresses...

For, an example of how all this works, you can see the AN1575/76/77...

hope this helps.

Best regards,

Venky