Nandflash problem

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

xiaoyao99
Posts: 4
Joined: Thu May 15, 2014 8:49 am

Nandflash problem

Mon May 26, 2014 8:41 am

Hello everyone,

I use samsung nandflash K9F2G08U0M for 3 years, it has no problem. But recently i use K9F4G08U0E or K9F1G08U0E, there are some issues.

The MCU is AT91SAM9G45. The board is normal when i program the bootstrap, u-boot, kernel and file system, and it works normally after first boot. But the board print lots of debug information when it reboot. 

Please help.

Code: Select all

Starting kernel ...




Uncompressing Linux.............................................................
............................. done, booting the kernel.
Linux version 2.6.30 (aps@yufeng-laptop) (gcc version 4.2.0 20070413 (prerelease
) (CodeSourcery Sourcery G++ Lite 2007q1-10)) #9 Wed Oct 12 12:04:56 CST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9G45-EKES
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 root=/dev/mtdblock5 mtdparts=a
t91_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(r
oot) rw rootfstype=jffs2
NR_IRQS:192
AT91: 160 gpio irqs in 5 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 62016KB available (2444K code, 209K data, 100K init, 0K highmem)
Calibrating delay loop... 199.47 BogoMIPS (lpj=997376)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
atmel_tcb: probe of atmel_tcb.0 failed with error -22
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 121
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfeffee00 (irq = 1) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfff90000 (irq = 8) is a ATMEL_SERIAL
atmel_usart.3: ttyS3 at MMIO 0xfff94000 (irq = 9) is a ATMEL_SERIAL
atmel_usart.4: ttyS4 at MMIO 0xfff98000 (irq = 10) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
macb macb: invalid hw address, using random
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffbc000 irq 25 (0a:7e:13:83:25:bb)
eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=ffffffff:00, irq=-
1)
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bi
t)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Creating 6 MTD partitions on "atmel_nand":
0x000000000000-0x000000020000 : "Partition 1"
0x000000020000-0x000000060000 : "Partition 2"
0x000000060000-0x000000080000 : "Partition 3"
0x000000080000-0x0000000a0000 : "Partition 4"
0x000000200000-0x000000400000 : "Partition 5"
0x000000400000-0x000008000000 : "Partition 6"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
atmel-ehci atmel-ehci: Atmel EHCI UHP HS
atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1
atmel-ehci atmel-ehci: irq 22, io mem 0x00800000
atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Atmel EHCI UHP HS
usb usb1: Manufacturer: Linux 2.6.30 ehci_hcd
usb usb1: SerialNumber: atmel-ehci
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 2
at91_ohci at91_ohci: irq 22, io mem 0x00700000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: AT91 OHCI
usb usb2: Manufacturer: Linux 2.6.30 ohci_hcd
usb usb2: SerialNumber: at91
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xfff78000 mapped at c485e000
atmel_usba_udc atmel_usba_udc: FIFO at 0x00600000 mapped at c4900000
mice: PS/2 mouse device common for all mice
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
Registered led device: d8
Registered led device: d6
Registered led device: d7
at_hdmac at_hdmac: Atmel AHB DMA Controller ( cpy slave ), 8 channels
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
atmel_mci atmel_mci.0: Using dma0chan0 for DMA transfers
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff80000 irq 11, 1 slots
atmel_mci atmel_mci.1: Using dma0chan1 for DMA transfers
atmel_mci atmel_mci.1: Atmel MCI controller at 0xfffd0000 irq 29, 1 slots
atmel_mci atmel_mci.1: Atmel MCI controller at 0xfffd0000 irq 29, 1 slots
uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <4>mtd->
read(0x1f9d4 bytes from 0xe0062c) returned ECC error
uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <4>mtd->
read(0x1661c bytes from 0xe099e4) returned ECC error
Empty flash at 0x00e099e0 ends at 0x00e0a000
jffs2_scan_eraseblock(): Node at 0x00e0a000 {0x1985, 0xffff, 0xffff0046) has inv
alid CRC 0xffff3396 (calculated 0xc7642bfd)
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a004: 0x0046 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a008: 0x3396 in
stead
uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <4>mtd->
read(0x15ff0 bytes from 0xe0a010) returned ECC error
Empty flash at 0x00e0a00c ends at 0x00e0a010
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a010: 0x0002 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a014: 0x21b6 in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a020: 0xcb3b in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a024: 0xcb3b in
stead
Empty flash at 0x00e0a028 ends at 0x00e0a02c
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a02c: 0xffff in
stead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a030: 0x0002 in
stead
Empty flash at 0x00e0a034 ends at 0x00e0a03c
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00e0a03c: 0xa69b in
stead
Further such events for this erase block will not be printed
Empty flash at 0x00e0a04c ends at 0x00e0a050
Empty flash at 0x00e0a068 ends at 0x00e0a06c
Empty flash at 0x00e0a074 ends at 0x00e0a07c
uncorrectable error : <3>uncorrectable error : <3>uncorrectable error : <4>mtd->
read(0x15f70 bytes from 0xe0a090) returned ECC error
Empty flash at 0x00e0a08c ends at 0x00e0a090
Empty flash at 0x00e0a0a8 ends at 0x00e0a0ac
Empty flash at 0x00e0a0b4 ends at 0x00e0a0bc
Empty flash at 0x00e0a0cc ends at 0x00e0a0d0
Empty flash at 0x00e0a0e8 ends at 0x00e0a0ec
Empty flash at 0x00e0a0f4 ends at 0x00e0a0fc
uncorrectable error : <3>uncorrectable error : <4>mtd->read(0x15ef0 bytes from 0
xe0a110) returned ECC error
Empty flash at 0x00e0a10c ends at 0x00e0a110
Empty flash at 0x00e0a128 ends at 0x00e0a12c
Empty flash at 0x00e0a134 ends at 0x00e0a13c
Empty flash at 0x00e0a14c ends at 0x00e0a150
Empty flash at 0x00e0a168 ends at 0x00e0a16c
Empty flash at 0x00e0a174 ends at 0x00e0a17c
uncorrectable error : <3>uncorrectable error : <4>mtd->read(0x15e70 bytes from 0
xe0a190) returned ECC error
Empty flash at 0x00e0a18c ends at 0x00e0a190
Empty flash at 0x00e0a1a8 ends at 0x00e0a1b0
Empty flash at 0x00e0a1b4 ends at 0x00e0a1bc
Empty flash at 0x00e0a1cc ends at 0x00e0a1d0
Empty flash at 0x00e0a1e8 ends at 0x00e0a1ec
Empty flash at 0x00e0a1f4 ends at 0x00e0a1fc
uncorrectable error : <4>mtd->read(0x15ddc bytes from 0xe0a224) returned ECC err
or
Empty flash at 0x00e0a220 ends at 0x00e0a224
Empty flash at 0x00e0a228 ends at 0x00e0a22c
Empty flash at 0x00e0a234 ends at 0x00e0a238
Empty flash at 0x00e0a260 ends at 0x00e0a264
Empty flash at 0x00e0a268 ends at 0x00e0a26c
Empty flash at 0x00e0a274 ends at 0x00e0a278
uncorrectable error : <4>mtd->read(0x15d54 bytes from 0xe0a2ac) returned ECC err
or
Empty flash at 0x00e0a2a8 ends at 0x00e0a2ac
Empty flash at 0x00e0a2e0 ends at 0x00e0a2e4
Empty flash at 0x00e0a2e8 ends at 0x00e0a2ec
Empty flash at 0x00e0a2f4 ends at 0x00e0a2f8
Empty flash at 0x00e0a320 ends at 0x00e0a324
uncorrectable error : <4>mtd->read(0x15cd4 bytes from 0xe0a32c) returned ECC err
or
Empty flash at 0x00e0a328 ends at 0x00e0a32c
Empty flash at 0x00e0a334 ends at 0x00e0a338
Empty flash at 0x00e0a360 ends at 0x00e0a364
Empty flash at 0x00e0a368 ends at 0x00e0a36c
Empty flash at 0x00e0a374 ends at 0x00e0a378
uncorrectable error : <4>mtd->read(0x15c1c bytes from 0xe0a3e4) returned ECC err
or
Empty flash at 0x00e0a3e0 ends at 0x00e0a3e4
Empty flash at 0x00e0a3e8 ends at 0x00e0a3ec
Empty flash at 0x00e0a3f4 ends at 0x00e0a3f8
Empty flash at 0x00e0a408 ends at 0x00e0a40c
Empty flash at 0x00e0a41c ends at 0x00e0a420
Empty flash at 0x00e0a428 ends at 0x00e0a42c
Empty flash at 0x00e0a434 ends at 0x00e0a438
Empty flash at 0x00e0a43c ends at 0x00e0a440
Empty flash at 0x00e0a448 ends at 0x00e0a44c
Empty flash at 0x00e0a45c ends at 0x00e0a460
Empty flash at 0x00e0a468 ends at 0x00e0a46c
Empty flash at 0x00e0a474 ends at 0x00e0a478
Empty flash at 0x00e0a47c ends at 0x00e0a480
Empty flash at 0x00e0a488 ends at 0x00e0a48c
Empty flash at 0x00e0a49c ends at 0x00e0a4a0
Empty flash at 0x00e0a4a8 ends at 0x00e0a4ac
Empty flash at 0x00e0a4b4 ends at 0x00e0a4b8
Empty flash at 0x00e0a4bc ends at 0x00e0a4c0
Empty flash at 0x00e0a4c8 ends at 0x00e0a4cc
Empty flash at 0x00e0a4dc ends at 0x00e0a4e0
Empty flash at 0x00e0a4e8 ends at 0x00e0a4ec
Empty flash at 0x00e0a4f4 ends at 0x00e0a4f8
Empty flash at 0x00e0a4fc ends at 0x00e0a500
Empty flash at 0x00e0a508 ends at 0x00e0a50c
Empty flash at 0x00e0a51c ends at 0x00e0a520
Empty flash at 0x00e0a528 ends at 0x00e0a52c
Empty flash at 0x00e0a534 ends at 0x00e0a538
Empty flash at 0x00e0a53c ends at 0x00e0a540
Empty flash at 0x00e0a548 ends at 0x00e0a54c
Empty flash at 0x00e0a55c ends at 0x00e0a560
Empty flash at 0x00e0a568 ends at 0x00e0a56c
Empty flash at 0x00e0a574 ends at 0x00e0a578
Empty flash at 0x00e0a57c ends at 0x00e0a580
Empty flash at 0x00e0a588 ends at 0x00e0a58c
Empty flash at 0x00e0a59c ends at 0x00e0a5a0
Empty flash at 0x00e0a5a8 ends at 0x00e0a5ac
Empty flash at 0x00e0a5b4 ends at 0x00e0a5b8
Empty flash at 0x00e0a5bc ends at 0x00e0a5c0
Empty flash at 0x00e0a5c8 ends at 0x00e0a5cc
Empty flash at 0x00e0a5dc ends at 0x00e0a5e0
Empty flash at 0x00e0a5e8 ends at 0x00e0a5ec
Empty flash at 0x00e0a5f4 ends at 0x00e0a5f8
Empty flash at 0x00e0a5fc ends at 0x00e0a600
Empty flash at 0x00e0a61c ends at 0x00e0a620
Empty flash at 0x00e0a63c ends at 0x00e0a640
Empty flash at 0x00e0a65c ends at 0x00e0a660
Empty flash at 0x00e0a67c ends at 0x00e0a680
Empty flash at 0x00e0a69c ends at 0x00e0a6a0
Empty flash at 0x00e0a6bc ends at 0x00e0a6c0
Empty flash at 0x00e0a6dc ends at 0x00e0a6e0
Empty flash at 0x00e0a6fc ends at 0x00e0a700
Empty flash at 0x00e0a71c ends at 0x00e0a720
Empty flash at 0x00e0a73c ends at 0x00e0a740
Empty flash at 0x00e0a75c ends at 0x00e0a760
Empty flash at 0x00e0a77c ends at 0x00e0a780
Empty flash at 0x00e0a79c ends at 0x00e0a7a0
Empty flash at 0x00e0a7bc ends at 0x00e0a7c0
Empty flash at 0x00e0a7dc ends at 0x00e0a7e0
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: Nandflash problem

Wed May 28, 2014 12:26 am

Don't double post.
Read the "README BEFORE POSTING! article at the top of each sub-forum page.
xiaoyao99 wrote:

Code: Select all

NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bi
t)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Creating 6 MTD partitions on "atmel_nand":
The absence of bad blocks is rather suspicious.
When the NAND Flash is programmed, were the factory-marked bad blocks overwritten?
Can you make reports on the NAND bad blocks before and after programming the devices?
For this "flawless" NAND chip, try running a tester program, such as the NAND project program in the Atmel Softpack.

Regards
xiaoyao99
Posts: 4
Joined: Thu May 15, 2014 8:49 am

Re: Nandflash problem

Thu May 29, 2014 10:33 am

Hi blue_z,

Thanks a lot.

The device does not print these debug information at first boot after programming. But it print these information after reboot, and print more after each reboot. The device has no ICE interface, so it could not run a tester program.

The chip has no bad block before and after programming.

Code: Select all

loading history file ... 0 events added
SAM-BA console display active (Tcl8.5.9 / Tk8.5.9)
(sam-ba_2.12) 1 % 
(sam-ba_2.12) 1 % NANDFLASH::Init
-I- NANDFLASH::Init (trace level : 4)
-I- Loading applet applet-nandflash-at91sam9m10.bin at address 0x70000000
-I- Memory Size : 0x8000000 bytes
-I- Buffer address : 0x70003E30
-I- Buffer size: 0x20000 bytes
-I- Applet initialization done
(sam-ba_2.12) 1 % NANDFLASH::BadBlockList
-I- No Bad Block found
(sam-ba_2.12) 1 % 
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: Nandflash problem

Thu May 29, 2014 10:05 pm

xiaoyao99 wrote:The device has no ICE interface, so it could not run a tester program.
Not having a JTAG port does not preclude you from running a NAND tester program from the Atmel Softpack.
xiaoyao99 wrote:The chip has no bad block before and after programming.
How many NAND chips do you have that are "flawless"?

Here's a FAQ entry on your problem: http://www.linux-mtd.infradead.org/faq/ ... agicnfound
The last suggestion of building a fresh JFFS2 filesystem from an erased partition has been useful to me in the past. It's easy to do if you can boot a kernel with a complete initramfs.

Regards
xiaoyao99
Posts: 4
Joined: Thu May 15, 2014 8:49 am

Re: Nandflash problem

Wed Jun 18, 2014 8:48 am

Hi blue_z,

Thanks a lot.

I have replaced the nandflash with MT29F2G08ABAEAWP, it's OK now.
smart
Posts: 16
Joined: Sat Dec 31, 2016 10:42 am

Re: Nandflash problem

Tue Jan 03, 2017 5:57 am

xiaoyao99 wrote:Hi blue_z,

Thanks a lot.

I have replaced the nandflash with MT29F2G08ABAEAWP, it's OK now.
please help me and the link is :
discussions/viewtopic.php/t,25666.html

many tks !! :D

Return to “Linux”

Who is online

Users browsing this forum: Google [Bot] and 1 guest