We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
My boot code is booted from the SPI flash and it copies the application code to the 0x80000000 address, where the SDRAM starts.
The NAND and NOR bootloader codes written by KEIL has an AppEntry function which is below:
#define EXT_SDRAM 0x80000000 typedef void (*fnc) (void); const fnc AppEntry = (fnc)EXT_SDRAM; int main() { - - AppEntry(); }
I use this function in my code to start execution from 0x80000000 address. However, it does not work! The program counter does not jump to my location, instead, it continues executing in its own function.
I also tried to stop at a breakpoint and change the value of the PC by hand. But, it had the same affect, no jump occured.
The same code works in NOR bootloader, so maybe I have something in the project options to fix?
Besides, in the NOR bootloader, the mode is "supervisor mode". I also switched to this mode in my code, but I still have the same result.
Can someone please help me out of this issue?
Thanks
Assuming you are (still) using the LPC3250 ...
Have you configured the startup code of your bootloader to initialise the SDRAM?
I believe the SDRAM is initialized, because, the application code is correctly transfered from the SPI flash to SDRAM.
Reset occurs when the PC value is changed to the SDRAM.
Besides, I am using the evaluation version of uVision. Does it make such an effect?
ps: Yes, I still am using LPC3250.
Thanks for your helps.