cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 NAND Problem

aveal
Associate II
Posted on August 12, 2014 at 18:35

Hi,

I have a problem with my steval-ccm008v1 evaluation board.

When I load ST Mass Storage example everything is fine. I connect my board to PC and format it through Windows. Then I see a filesystem on my board and I can create some files on it. But after reconnecting (or reseting) the board the filesystem falls and I need to format it every time I connect my board via USB.

Thanking in an anticipation, Aveal.

#nand-flash-msc #stm32f4 #steval-ccm008v1
5 REPLIES 5
Andrey.St.
Associate II
Posted on October 08, 2014 at 12:15

Hi

,

Aveal

!

For

solve this problem,

we need

to have

the source code

,

because

demoboard

have

a little

number of people

,

however,

just

a Board with

nand

flash

memory

have many.

If possible

, put

the complete project

for download.

Posted on October 08, 2014 at 17:15

NAND with large erase blocks doesn't really lend itself to a simple MSC or FAT File System usage.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrey.St.
Associate II
Posted on October 08, 2014 at 19:05

Strange

, but

all

flash drives

work with

Nand

flash memory

, and

examples

STEVAL_CCM006V1

-

STEVAL_CCM008V2

also

to work with

NAND

flash

.

The use of a

Look

up table

(

LUT)

should help

with recording

sectors.

Yes

and

do not exclude the possibility

of external

memory

(static

RAM

,

SDRAM

for

stm32f42x

),

or

for some

enough

internal memory

.

By the way

,

dear

Clive1

,

you can't tell

where you can find

suorce

code

from

STEVAL_CCM008V1

,

or perhaps

he is

do you

?

Posted on October 08, 2014 at 19:22

Yes, but your SD Card or USB Flash present you with a micro processor that handles the large blocks (128KB or whatever) and allows you to read/write 512 byte sectors, multiple sectors, and deals with ALL the dirty details about error correction, deblocking and block mapping/remapping, and wear leveling.

So unless you have a 128KB RAM buffer to play with, or you copy data to a new block on the fly, it's definitely not EASY to deal with raw NAND devices on a micro like the STM32.

You'd likely have to speak to your local ST Rep or FAE, and sign appropriate NDA, IP and licencing documents/releases.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
balmukund66
Associate II
Posted on October 09, 2014 at 07:57

Hello ,

Please tell,which NAND FLASH you are using?

For ONFI NAND FLASH ,it supports only upto 1Gb.

For making it working ->

Please make following change:

Replace statement in this function   ''void FSMC_NAND_ONFI_Compliance(void)''

   if(Buff[6]& 0x10)

    COPY_STATE = COPY_BACK_SUPPORTED;

   else

    COPY_STATE = COPY_BACK_NOT_SUPPORTED;

with 

 if(0)

COPY_STATE = COPY_BACK_SUPPORTED;

else

COPY_STATE = COPY_BACK_NOT_SUPPORTED;

It will work without CopyBack command.

Thanks