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  [ 6 posts ] 
Author Message
 Post subject: NAND Flash Controller
PostPosted: Thu Jan 07, 2010 7:17 pm 
Offline

Joined: Thu Jan 07, 2010 7:10 pm
Posts: 4
Are there any examples using the hardware NAND Flash Controller with the SMC? All of the examples from Atmel use the CPU for transactions instead of setting up the NFC SRAM.


Top
 Profile  
 
 Post subject: Re: NAND Flash Controller
PostPosted: Sat Jan 09, 2010 10:55 am 
Offline

Joined: Sat Aug 22, 2009 8:12 am
Posts: 21
On 9G45 board the nand flash is controlled by EBI1-SMC ,you can download example of this board.

_________________
An RTOS specially for Cortex-M3----> http://www.coocox.org


Top
 Profile  
 
 Post subject: Re: NAND Flash Controller
PostPosted: Mon Jan 11, 2010 4:21 pm 
Offline

Joined: Thu Jan 07, 2010 7:10 pm
Posts: 4
Thanks, but the AT91SAM9G45 does not contain the new NFC feature to which I am referring. I am having no trouble with the old way of using the EBI to communicate with a NAND flash device. However, the SAM3U has hardware logic for reading/writing pages to a dedicated SRAM. I am using high-speed USB mass storage and need the extra throughput that this hardware provides.

For more information see "25.15 NAND Flash Controller Operations" of the SAM3U user guide.


Top
 Profile  
 
 Post subject: Re: NAND Flash Controller
PostPosted: Wed Jul 28, 2010 1:36 pm 
Offline
User avatar

Joined: Fri Feb 13, 2004 7:53 pm
Posts: 329
Hello, the SAM3U-EK software pack contains a NAND flash example.

http://www.atmel.com/dyn/products/tools ... ol_id=4568

The board's demo source code is also available and makes use of NAND flash as well

Regards.


Top
 Profile  
 
 Post subject: Re: NAND Flash Controller
PostPosted: Wed May 04, 2011 6:00 am 
Offline

Joined: Wed May 04, 2011 5:40 am
Posts: 4
Yes, there are examples of how to talk to a NAND Flash chip, but those same examples do not make use of the NAND Flash controller or the ECC system, instead forcing you to use bit-banging software-based interfaces.

Specifically, in both basic-nandflash-project and basic-fatfs-nandflash-project, the file at91lib/memories/nandflash/RawNandFlash.c (which everything depends on) reads as follows:

[code]
#include "RawNandFlash.h"
#include "NandCommon.h"
#include "NandFlashModelList.h"
#include <utility/trace.h>
#include <utility/assert.h>

#include <string.h>

#if !defined(CHIP_NAND_CTRL)
/* ... lots omitted ... */
#endif
[/code]

So this file compiles to nothing if CHIP_NAND_CTRL is set. This results in the build failing due to linker errors.

Also, the file at91lib/memories/nandflash/EccNandFlash.c starts off with:

[code]
#include "EccNandFlash.h"
#include "NandCommon.h"
#include "NandSpareScheme.h"
#include <utility/trace.h>
#include <utility/hamming.h>
#include <utility/assert.h>
#ifdef HARDWARE_ECC
#include <hsmc4/hsmc4_ecc.h>
#endif
#include <string.h>
[/code]

The file at91lib/peripherals/hsmc4/hsmc4_ecc.h is simply not present in at91lib 1.6. Therefore, enabling HARDWARE_ECC means a failed build.

I didn't buy a SAM3U with NFC and ECC just to ignore them. Is this a simple omission or do these subsystems simply not work on the SAM3 series (hence their omission from at91lib)?

P.S. Why is BBCode off?

_________________
--- Admins: Please enable BBCode. ---


Top
 Profile  
 
 Post subject: Re: NAND Flash Controller
PostPosted: Mon Jul 25, 2011 1:51 pm 
Offline

Joined: Tue Jul 13, 2010 12:54 pm
Posts: 32
If you install SAMBA 2.10 and look in the C:\Program Files\ATMEL Corporation\SAM-BA v2.10\applets\at91lib\peripherals\hsmc4 directory, you should find the hsmc4 and hsmc4_ecc files.

If you download the softpack for the Sam3S you will also find a folder SoftPack_at91sam3s_gnu_1.0\libraries\memories\nandflash which contains nfcRawNandflash.c which uses the nfc controller.

With these files you should be able to modify the example for the sam3u to use the NFC controller. Just make sure your NAND flash works the same as that on the dev board. Some of the Numonyx NAND chips approach adressing differently.


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

All times are UTC + 1 hour [ DST ]


Who is online

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