cancel
Showing results for 
Search instead for 
Did you mean: 

STR7 Interrupts with a Boot Loader

Posted on August 03, 2006 at 05:55

STR7 Interrupts with a Boot Loader

3 REPLIES 3
Posted on August 01, 2006 at 20:03

My code is divided into two sections; a Boot Loader and a Application Section. The boot loader resides between address 0x40000000 and 0x40003FFF and the Application will start at 0x40008000. The boot loader is used to download the application from the CAN port and configure the module.

My questions is regarding interrupt vectors. I need to have all the interrupt routines located in the applications section. I have read the user manual and appliction notes but I am still not clear on how to setup the EIC to vector to the routines that are in the application area of flash. I am using the Keil Tool set.

Thanks, KC

shangdawei1
Associate II
Posted on August 02, 2006 at 01:14

for your application:

user classes:

DATA (0x20000040-0x2000FFFF), <------ 0x20000000..0x2000003F 64 bytes rev.

CODE (0x40004000-0x4003FFFF),

CONST (0x40004000-0x4003FFFF),

CODE_IRQ (0x40004000-0x4000FFFF)

user segments:

STARTUPCODE (0x40004000)

after application is downloaded, bootloader can copy 64 bytes from 0x40004000 to 0x20000000, and rmap RAM to 0x00000000.

Posted on August 02, 2006 at 11:54

Radix Thanks for the Info:

I added the following in my initialization just to see if I could reloacate the interrupt routines before I tackle the bootloader apps combination. I used the Target Memory selection in the Keil GUI to locate 71x_it.c at 0x40009000. After I run the code and look at the(EIC) debug window I see that I have Timer 3 enable and an interrupt pending with priority 1. EIC_SIR21 = 0x903D0001 but I never hit the breakpoint for T3TIMI_IRQHandler(void).

The other thing that I don't understand is the value in SIR[T3TIMI_IRQChannel] is 0xF874 when I have the interrupt working without relocating it.

EIC->IVR = (u32) 0x40009000;

EIC->SIR[T3TIMI_IRQChannel] = ((u16) T3TIMI_IRQHandler) << 16;

EIC_IRQChannelConfig(T3TIMI_IRQChannel, ENABLE);

EIC_IRQChannelPriorityConfig(T3TIMI_IRQChannel, 1);

EIC_IRQConfig(ENABLE); // Configure IRQ

Thanks, KC