Hi,
I work on AT91SAM9260-EK board with Keil compiler, and I want to launch a program which is in NAND Flash.
To do that, I did a Bootloader which is in the Dataflash and which is loaded in internal SRAM on reset, and which must launch the application in NAND Flash. The problem it is that doesn't work.
Here my code :
Code:
#include <AT91SAM9260.H> // AT91SAM9260 definitions
#include <lib_AT91SAM9260.h> // Library function definitions
// Pointer to start of the NAND Flash
typedef void (*fnc)(void);
const fnc AppEntry = (fnc) (0x40000000);
int main (void)
{
// Activation of PIO A, B & C
AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_PIOA) | (1 << AT91C_ID_PIOB) | (1 << AT91C_ID_PIOC);
AppEntry(); // Start the copied Application
return (0);
}
The application in NAND Flash is simple, it must make blink the led DS5.
Thank you in advance for your help