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  [ 5 posts ] 
Author Message
 Post subject: AT91SAM9260EK - Accessing the NAND flash
PostPosted: Thu Mar 13, 2008 2:21 pm 
Offline

Joined: Tue Jun 26, 2007 6:27 pm
Posts: 81
Hello,

Is it possible to store a file in the NAND-Flash, maybe called "test.txt".

I want to write it at an special address and read it back another time from the address.

Is it possible ?


I need direct access to the NAND...

Thank you.

M. Sahm


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 6:38 pm 
Offline

Joined: Thu Mar 13, 2008 6:22 pm
Posts: 5
Location: Moscow, Russia
Why don't you use e.g. buildroot initial rootfs image generator?

You can modify FS content before making final image!

P.S. You can additionally try to copy data from NAND using u-boot `nand` comand and then use kernel mtd module!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2008 7:36 pm 
Offline

Joined: Tue Jun 26, 2007 6:27 pm
Posts: 81
Hello,

I need to access the nand at runtime to store/read data from it.

Do I have to make a PARTITION to use the mtd utils in linux.
A Partition builds /dev/mtdX and /dev/mtdXro and /dev/mtdblockX

or could I use this functions like nandwrite to write to an specified address like 0x100000 ?

and...

how could I make the /dev/mtdX write protected ?

Thank you very much


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 14, 2008 12:27 am 
Offline

Joined: Thu Mar 13, 2008 6:22 pm
Posts: 5
Location: Moscow, Russia
You can simply seek/read/write on /dev/mtdX i think
Anyway look through http://www.linux-mtd.infradead.org/faq/nand.html, especially read about bad block handling during NAND operations!!!

About write-protection. NAND flash provide special WP pin - you сan use it after final flash modification. I think that kernel will recognize such situation and block /dev/mtdX write operation/


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 17, 2008 7:40 pm 
Offline

Joined: Thu Aug 09, 2007 10:48 am
Posts: 106
Location: Artec Design LLC, Tallinn, Estonia
Mount the NAND's mtd device as jffs2 filesystem and use it just as a regular media. jffs2 handles bad-blocks, wear-levelling etc automatically and you save youself from a lot of trouble.
If needed, you can create multiple partitions. Just provide required parameters from kernel command line with partition offsets and sizes.


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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: