AnsweredAssumed Answered

unable to use correctly the FFS

Question asked by arnogir on Nov 17, 2014
Latest reply on Nov 18, 2014 by arnogir

shell> nand_erase_ffs

 

nand_erase_ffs

Erasing FFS area from block #10 to block #2010...

Please use "ffs_open" command to re-open NAND flash device.

 

shell> ffs_open

 

ffs_open

Error opening filesystem: UNKNOWN ERROR !!!<CR><LF>

Hello

 

I'm using a Kinesis K70F150

My board is exactly the same as TWRK70f120m (For DDR and nandflash)

 


I'm using MQX 4.1.1 rev1.3

 

 

 

And I try the ffs exemple (C:\Freescale\Freescale_MQX_4_1\ffs\examples\mfs_nandflash). But I can't open correctly the nandflash. Please find below the trace:

This is the Flash File System example, type help for list of available commands

If this is the first time you use the demo, you should run "nand_erase_ffs" command first.

Shell (build: Nov 17 2014)

Copyright (c) 2013 Freescale Semiconductor;

 

shell>

shell> nand_erase_ffs

 

nand_erase_ffs

Erasing FFS area from block #10 to block #2010...

Please use "ffs_open" command to re-open NAND flash device.

 

shell> ffs_open

ffs_open

Unable to open NAND Flash device.

You must run "ffs_repair" command

 

shell> ffs_open

ffs_open

Error opening filesystem: UNKNOWN ERROR !!!


shell> ffs_open

 

ffs_open

Unable to open NAND Flash device.

You must run "ffs_repair" command

 

shell> ffs_repair

 

ffs_repair

Repairing...

Error opening filesystem: UNKNOWN ERROR !!!

 

Another after a board restart:

 

...

shell> ffs_repair

 

ffs_repair

Repairing...

You must re-open

 

shell> ffs_repair

 

ffs_repair

Repairing...

Error opening filesystem: UNKNOWN ERROR !!!

 

Another were the erase seems work! ???

 

 

So, I'm unable to work with nandflash. I try all command, but nothing work.

 

I also apply a patch given in this forum:

 

You need to add two lines (3 and 4 in the code snippet below) into _bsp_nandflash_io_init() in the BSP init_gpio.c, in order to specify divider of NFC clock:

 

 

 

  1. SIM_SOPT2_REG(SIM_BASE_PTR) |= SIM_SOPT2_NFCSRC(0x00); 
  2. /* SIM_CLKDIV4: NFCDIV=7 */ 
  3. SIM_CLKDIV4 &=  0x00FFFFFF; /* clear 8 most significant bits */ 
  4. SIM_CLKDIV4 |=  SIM_CLKDIV4_NFCDIV(7); 
  5. /* Enable clock gate to NFC module */ 
  6. sim->SCGC3 |= SIM_SCGC3_NFC_MASK;

 

Did you have an Idea?

 

 

For information on Open, on step by step:

mfs_init.c : MFS_Open_Device : error_code = MFS_Read_device_sector(drive_ptr, BOOT_SECTOR, drive_ptr->DIR_SECTOR_PTR);

This step, return error 0x0A02

Outcomes