K66 custom board + spi NAND Flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K66 custom board + spi NAND Flash

905 Views
bogdan_adrian91
Contributor II

Hello,

I designed a custom board that is a sort of sound recorder.

It takes some audio data and is supposed to write it to an external nand flash and access the data via USB connection to PC.

I have a couple of questions.

1. Can i interface the nand flash simply by using an SPI interface on the controller  ? If yes, is there an example in the sdk i might use ?

2. Do i need to format the nand flash to a common filesystem such as FAT ? And if so is there an example in the sdk ?

3. I presume i must implement a mass storage emulator on my controller so i may access the data on my nand flash , is there an example in the sdk i might use ?

4. What is different in  DSPI(DMA SPI)  as compared to standard SPI ?

Labels (2)
0 Kudos
3 Replies

703 Views
mjbcswitzerland
Specialist V

Hi

Are you certain that you use SPI NAND flash and not NOR flash? NAND is available in larger sizes but requires bad block management due to lower reliability and NOR tends to be used for such applications.

You can write as a FAT or as linear data in both cases.

DSPI can be considered as SPI - it has the ability to queue data and send/receive each bytes/word with different parameters and chip selects but in your case this will not be used.

Audio logging to SPI Flash devices or SD cards and file retrieval via HS USB-MSD, FTP and web server are standard applications in the uTasker K66 project.

Regards

Mark

Complete Kinetis solutions for professional needs, training and support: http://www.utasker.com/kinetis.html
Kinetis K66:
- http://www.utasker.com/kinetis/TWR-K65F180M.html
- http://www.utasker.com/kinetis/FRDM-K66F.html
- http://www.utasker.com/kinetis/TEENSY_3.6.html
uTasker: supporting >1'000 registered Kinetis users get products faster and cheaper to market
Request Free emergency remote desk-top consulting at http://www.utasker.com/services.html

Open Source version at https://github.com/uTasker/uTasker-Kinetis

0 Kudos

703 Views
bogdan_adrian91
Contributor II

Hello,

Thanks for the reply.

Indeed, I am using nand flash.

I am using a bare metal approach and from what i see isn't uTasker a operating sysytem ?  My device will run on a small battery so i don't think i will be able to use uTasker.

Isn't there some any other way ?

0 Kudos

703 Views
mjbcswitzerland
Specialist V

Hi

uTasker has bare-metal mode, uTasker OS mode and FreeRTOS mode. It also supports automatic dynamic low power mode, whereby bare metal coding will not give lower power consumption than the uTasker OS mode where this work has already been realised and optimised over several years of industrial usage.

It includes all that you need (boot loaders, file systems, TCP/IP, USB stacks and ready to run complete applications), as well as SPI flash drivers.

The complication with NAND is that you need to manage bad blocks due to NAND's inherent unreliability but it depends on how much audio you need to collect as to whether you need to do anything more complicated than skipping bad blocks or clean them up and use a file allocation table or not. As reference there is a description of the uTasker NAND FAT strategy here: http://www.utasker.com/docs/uTasker/uTasker_NAND.pdf

Regards

Mark

0 Kudos