Hello,
I'm working with the AT91SAM9361 controller. Moreover I installed a nor flash (where the real program is stored) and a small data flash (where a small bootloader is stored. Among other things, the bootloader should check if the arm vectors (at the beginning of each code) are valid). If this code is valid the program stored in the nor flash should be executed.
I want to use two seperate memories, so that everyone is able to load a new update of the real program via the bootloader in the dataflash in the nor flash.
How is it possible to start the application from the bootloader in the nor flash? Do I have to set the PC to the beginning of the nor flash? Which are the steps to execute this programm?
I'm not working with an operating system.
best regards Hans
I made a test and it seems that it should work. I load a small programm in the internal RAM so that I could see what the processor is doing.
The internal RAM is at 0x00200000
1. copy the 64Bytes at the beginning of the internal RAM
memcpy((char *)0x00200000, (char *)(0x10000000), 64);
2. functionsptr() //to 0x10000000
The PC jump to 0x10000000 and then to 0x10000058 (after the last vectors EAFFFFFE B...)
When I run the programm I get a lof of "JTAG Communication Failure" error messages.
Hi,
now I'm able to run the programm! The error was within the startup script. You have to disable the pll, because if the pll is already started, plls will be turned off!
I find this message in the atmel startup file. Maybe it would be a great thing if Keil could add some comments to their files, too!