cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupts while booting from bank 1

dcramer
Associate II
Posted on June 03, 2008 at 18:27

Interrupts while booting from bank 1

6 REPLIES 6
dcramer
Associate II
Posted on May 17, 2011 at 09:53

I implemented a boot loader that runs in bank 1 according to the sample code in an2675.zip. I can start the application in bank 0, but I can not get any interrupts working. This code was working until I implemented the coding changes recommended in the errata for flash memory remapping, in order to solve the external reset issue. I am having no problem getting the code to start, but I can not get any interrupts to occur.

Thanks

rgreenthal
Associate II
Posted on May 17, 2011 at 09:53

Try this to switch to b0s1

__ramfunc void SwitchToRun (void)

{

SCU->CLKCNTR = 0x00020002;

SCU->GPIOOUT[0] = 0x00000000;

SCU->GPIOOUT[1] = 0x00000000;

SCU->GPIOOUT[2] = 0x00000000;

SCU->GPIOOUT[3] = 0x00000000;

SCU->GPIOOUT[4] = 0x00000000;

SCU->GPIOOUT[5] = 0x00000000;

SCU->GPIOOUT[6] = 0x00000000;

SCU->GPIOOUT[7] = 0x00000000;

SCU->GPIOIN[0] = 0x00000000;

SCU->GPIOIN[1] = 0x00000000;

SCU->GPIOIN[2] = 0x00000000;

SCU->GPIOIN[3] = 0x00000000;

SCU->GPIOIN[4] = 0x00000000;

SCU->GPIOIN[5] = 0x00000000;

SCU->GPIOIN[6] = 0x00000000;

SCU->GPIOIN[7] = 0x00000000;

SCU->PRR0 = 0x00001053;

SCU->PRR1 = 0x00000000;

SCU->PCGRO = 0x000000DB;

SCU->PCGR1 = 0x00000000;

asm (''MOV R1,#0x10000'');

asm (''MOV PC,R1'');

}

dcramer
Associate II
Posted on May 17, 2011 at 09:53

Ok. Do I add this code before I jump to bank 0? My code is linked to start at 0x80000, so should I make the asm (''MOV R1,#0x10000'');

read asm (''MOV R1,#0x80000''); instead.

rgreenthal
Associate II
Posted on May 17, 2011 at 09:53

Looks good to me, if you are jumping to 512K address

dcramer
Associate II
Posted on May 17, 2011 at 09:53

Yep. 512 K address. Will try it in the morning and let you know.

Thanks

dcramer
Associate II
Posted on May 17, 2011 at 09:53

That suggestion didn't work. It looked good though.