This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Reset Problem in LPC23xx

Hi,

I am working on LPC2368 microcontroller. I was supposed to develop 2 firmwares in the same controller. I had developed a bootloader code and the actual code.
The bootloader runs at 0x0000 and the actual code is at 0x2000.
Now when i start the system it runs from 0x0000 and passes the execution to 0x2000 if there is no
firmware upgradation.
The actual code takes the upgration through serial port and stores at an address of 0x28000
and after succesful writing at 0x28000 it simply passes the execution to 0x0000 as follows

#define BOOTLOADER_START_ADDRESS 0x00

void execute_bootloader_code(void)
{

void (*bootloader_code_entry)(void);

VICIntEnClr = 0xFFFFFFFF; // disable all interrupts;

bootloader_code_entry = (void (*)(void))BOOTLOADER_START_ADDRESS;

bootloader_code_entry();
}

so when the bootloader runs and checks if there is a new firmware avaliable it erases the actual code at 0x2000 and starts writing the code from 0x28000 to 0x2000. Hence my new firmware has been upgraded and the execution is passed to 0x2000.

Now my problem is when i upgrade the code, my code is running upto a certain point in the intialization. The certain point is i am actually disbaling all interrupts and enabling only UART-2 and UART-0 interrupts.
When the execution comes to enabling of these interrupts the execution is passed to 0x000 i.e., reset vector...
I couldnt find the reason why my code is being reset. I had observed the RSIR and didnt find any thing suspicious..
How do i find why my code has jumped to 0x0000. can anyone suggest me to solve this problem.

Regards,
Srinivas.R