Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Problem on Boot with NAND Flash on AT91SAM9260-EK
PostPosted: Tue Aug 14, 2007 3:54 pm 
Offline

Joined: Tue Aug 07, 2007 11:56 am
Posts: 2
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 10:30 am 
Offline

Joined: Mon May 28, 2007 5:02 pm
Posts: 50
Location: Walton-on-Thames, UK
Hi

Your program just makes a jump to 0x40000000 and you are hoping that the NAND flash will work.

You can't directly execute programs in NANDFlash. NANDFlash has a mutiplexed address/data/command bus. The ALE & CLE lines are controlled by the addresses in the 0x40000000 space that are accessed.
You therefore need a driver to access NANDFlash.

The best thing to do is to write a driver which copies your program from NANDFlash into SDRAM and then you can execute it there.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: