Hi,
I am looking for a few hints on why I can't re-program a P1010RDB development system NAND flash with CW 10.3.3 and CW USB TAP. I was programming new u-boot images via u-boot through the serial console and that worked fine. I then proceeded to flash an image that causes u-boot to lock-up as it boots. Now I need to re-program the NAND flash with a working u-boot image.
I keep getting -
Did not erase bad block at address 0x00000000 Error: Erase failed.
I am using all the default software packages as supplied with CW 10.3.3 with no modifications. It appears to read the device ID. I've enabled as much logging as I can find in CW. Not sure what the issue is. Below is the last log. I was just trying to program the small bootloader in u-boot so that only one sector had to be erased. The larger u-boot images do the exact same thing. Thanks for any ideas.
fl::target -lc "FlashProgramElf0_Debug_P1010_Download"
fl::target -b 0x2000 0x30000
fl::target -v off -l on
cmdwin::fl::device -d "K9F5608Ux0D-IFC" -o "32Mx8x1" -a 0x0 0x1ffffff
cmdwin::fl::image -f "C:\\Users\\Frank\\Documents\\u-boot-git-r17\\git\\P1010RDB_NAND\\nand_spl\\u-boot-spl.bin" -t "Auto Detect" -re on -r 0x0 0x1ffffff -oe on -o 0x0
cmdwin::fl::erase image
Beginning Operation ...
-------------------------
log: Trying auto-detect...
log: File is NOT of type Motorola S-Record Format.
log: File is NOT of type Elf Format.
Auto-detection is successful.
File is of type Binary/Raw Format.
log: Using Algorithm: K9F5608x0D-IFC.elf
log:
log:
log: ======================================================================
log: === Target Configuration Settings
log: === Launch Configuration: FlashProgramElf0_Debug_P1010_Download
log: ======================================================================
log: Connecting ...
Performing target initialization ...
log: Connected ...
log:
log: ======================================================================
log: === Execute: Erase
log: === Timestamp: Fri Jul 11 17:25:31 2014
log: === Flash Device: K9F5608Ux0D-IFC
log: === Flash Organization: 32Mx8x1
log: === Flash Mem Start Addr: 0x00000000
log: === Flash Mem End Addr: 0x01FFFFFF
log: ======================================================================
Downloading Flash Device Driver ...
log: Loading Flash Device Driver at: 0x00002000
log: Flash Driver Buffer is at: 0x00006260
log: Flash Driver Buffer Size is: 0x0002BDA0
log:
log: Writing the Address
log: Writing the address of the sector list
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Reading flash ID ...
log: Reading init return status
log: Done
log:
log: Initialization Command Succeeded
log: Writing Erase Function Code
log: Writing the Address
log: Writing the Number of Sectors
log: Writing the address of the sector list
log: Writing the sector list
Erasing Sector 0x00000000 to 0x00003FFF
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Erasing ...
log: Reading erase return status
Did not erase bad block at address 0x00000000
Error: Erase failed.
log: Timestamp: Fri Jul 11 17:25:36 2014
Error: Erase failed.
Frank
已解决! 转到解答。
Hello Frank,
The default initialization file in CodeWarrior 10.3.3 is for P1010RDB-PB with NAND Flash MT29F16G08ABABAWP, but it seems that you are using P1010RDB-PA, the IFC configuration in the default initialization file is not suitable for your target.
Please use the attached initialization file for P1010RDB-PA.
Have a great day,
Yiping Wang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Frank,
The default initialization file in CodeWarrior 10.3.3 is for P1010RDB-PB with NAND Flash MT29F16G08ABABAWP, but it seems that you are using P1010RDB-PA, the IFC configuration in the default initialization file is not suitable for your target.
Please use the attached initialization file for P1010RDB-PA.
Have a great day,
Yiping Wang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yiping,
Still can't re-program the flash. It says it's programmed now but the board does not boot. Below are the three logs: 1) init debug CW, 2) flash programming and 3) nand boot. I verified that all the switches on the P1010RDB board are configured exactly as the quick start guide advises. I'm not sure why it says "NAND boot...skipping?" Any ideas what's wrong? Thanks.
1) CW init
Executing Initialization File: C:\Freescale\CW_PA_v10.3.3\PA\PA_Support\Initialization_Files\QorIQ_P1\P1010RDB_init_sram_flash.tcl
radix x
cmdwin::eclipse::config hexprefix 0x
cmdwin::eclipse::config MemIdentifier v
cmdwin::eclipse::config MemWidth 32
cmdwin::eclipse::config MemAccess 32
cmdwin::eclipse::config MemSwap off
cmdwin::mem p:0xff7e0004 -np
thread break: Stopped, 0x0, 0x0, cpuPowerPCBig, nand_ifc_flash_alg_debug.elf (state, tid, pid, cpu, target)
cmdwin::mem p:0xff700000 = 0x000e0000
cmdwin::mem p:0xe001e010 = 0x00000100
cmdwin::mem p:0xe0020e44 = 0x0000000C
cmdwin::reg Standard Special Purpose Registers/MSR = 0x02000200
cmdwin::reg regPPCTLB1/L2MMU_CAM0 = 0x70000FCAFC080000FF000000FF000001
cmdwin::reg regPPCTLB1/L2MMU_CAM1 = 0x70000FCAFC080000FE000000FE000001
cmdwin::reg regPPCTLB1/L2MMU_CAM2 = 0x500003CAFC080000E0000000E0000001
cmdwin::reg regPPCTLB1/L2MMU_CAM3 = 0x400001C0FC0800000000000000000001
cmdwin::reg regPPCTLB1/L2MMU_CAM4 = 0x400001CA1C080000EFB00000EFB00001
cmdwin::reg regPPCTLB1/L2MMU_CAM5 = 0x2000004A1C080000EFA00000EFA00001
cmdwin::mem p:0xe0000020 = 0x00000000
cmdwin::mem p:0xe001e010 = 0x00000100
cmdwin::mem p:0xe0020000 = 0x50010000
cmdwin::mem p:0xe0020100 = 0x00000000
cmdwin::mem p:0xe0020104 = 0x00000000
cmdwin::mem p:0xe0020000 = 0x90010000
cmdwin::mem p:0xe0000c08 = 0x000fe000
cmdwin::mem p:0xe0000c10 = 0x80400018
cmdwin::mem p:0xe0000c28 = 0x000efb00
cmdwin::mem p:0xe0000c30 = 0x80400010
cmdwin::mem p:0xe0000c48 = 0x00efa00
cmdwin::mem p:0xe0000c50 = 0x8040000d
cmdwin::mem p:0xe00e0060 = 0x000000c0
cmdwin::mem p:0xe001e0a0 = 0xFFFF0000
cmdwin::mem p:0xe001e130 = 0x00800000
cmdwin::mem p:0xe001e1c0 = 0x020C0405
cmdwin::mem p:0xe001e1c4 = 0x1D1D070C
cmdwin::mem p:0xe001e1c8 = 0x0180280F
cmdwin::mem p:0xe001e1cc = 0x04000000
cmdwin::mem p:0xe001e010 = 0xEFA00083
cmdwin::mem p:0xe001e0ac = 0xFE000000
cmdwin::mem p:0xe001e13c = 0x0000E000
cmdwin::mem p:0xe001e1f0 = 0x40050005
cmdwin::mem p:0xe001e1f4 = 0x1e000f00
cmdwin::mem p:0xe001e1f8 = 0x0410001c
cmdwin::mem p:0xe001e1fc = 0x00000000
cmdwin::mem p:0xe001e01c = 0xFE000101
cmdwin::mem p:0xe001e034 = 0xEFB00085
cmdwin::mem p:0xe001e0c4 = 0xFFFF0000
cmdwin::mem p:0xe001e154 = 0x00000000
cmdwin::mem p:0xe001e250 = 0xe00e000e
cmdwin::mem p:0xe001e254 = 0x0e001f00
cmdwin::mem p:0xe001e258 = 0x0e00001f
cmdwin::mem p:0xe001e25c = 0x00000000
cmdwin::mem p:0xe001e40c = 0x0e008000
cmdwin::mem p:0xe001e44c = 0x00000800
cmdwin::mem p:0xe0007000 = 0x80000403
cmdwin::mem p:0xe0007008 = 0x0000FB00
cmdwin::mem p:0xe0007020 = 0x28170008
cmdwin::reg e500 Special Purpose Registers/IVPR = 0x00000000
cmdwin::reg e500 Special Purpose Registers/IVOR0 = 0x00000100
cmdwin::reg e500 Special Purpose Registers/IVOR1 = 0x00000200
cmdwin::reg e500 Special Purpose Registers/IVOR2 = 0x00000300
cmdwin::reg e500 Special Purpose Registers/IVOR3 = 0x00000400
cmdwin::reg e500 Special Purpose Registers/IVOR4 = 0x00000500
cmdwin::reg e500 Special Purpose Registers/IVOR5 = 0x00000600
cmdwin::reg e500 Special Purpose Registers/IVOR6 = 0x00000700
cmdwin::reg e500 Special Purpose Registers/IVOR8 = 0x00000c00
cmdwin::reg e500 Special Purpose Registers/IVOR10 = 0x00000900
cmdwin::reg e500 Special Purpose Registers/IVOR11 = 0x00000f00
cmdwin::reg e500 Special Purpose Registers/IVOR12 = 0x00000b00
cmdwin::reg e500 Special Purpose Registers/IVOR13 = 0x00001100
cmdwin::reg e500 Special Purpose Registers/IVOR14 = 0x00001000
cmdwin::reg e500 Special Purpose Registers/IVOR15 = 0x00001500
cmdwin::reg e500 Special Purpose Registers/IVOR32 = 0x00001600
cmdwin::reg e500 Special Purpose Registers/IVOR33 = 0x00001700
cmdwin::reg e500 Special Purpose Registers/IVOR34 = 0x00001800
cmdwin::reg e500 Special Purpose Registers/IVOR35 = 0x00001900
cmdwin::mem v:0x00000700 = 0x48000000
cmdwin::mem v:0x00001500 = 0x48000000
cmdwin::reg e500 Special Purpose Registers/IAC1 = 0xfffffffc
cmdwin::reg e500 Special Purpose Registers/DBCR0 = 0x40800000
cmdwin::reg e500 Special Purpose Registers/DBCR1 = 0x00000000
cmdwin::eclipse::config runcontrolsync off
cmdwin::go
cmdwin::wait 50
cmdwin::eclipse::config runcontrolsync on
cmdwin::stop
thread break: Stopped, 0x0, 0x0, cpuPowerPCBig, nand_ifc_flash_alg_debug.elf (state, tid, pid, cpu, target)
cmdwin::reg e500 Special Purpose Registers/DBSR = 0x01CF0000
cmdwin::reg e500 Special Purpose Registers/DBCR0 = 0x41000000
cmdwin::reg e500 Special Purpose Registers/IAC1 = 0x00000000
cmdwin::reg e500 Special Purpose Registers/CSRR0 = 0x00000000
cmdwin::reg e500 Special Purpose Registers/CSRR1 = 0x00000000
cmdwin::reg Standard Special Purpose Registers/MSR = 0x02001200
cmdwin::reg e500 Special Purpose Registers/HID0 = 0x00004080
cmdwin::reg e500 Special Purpose Registers/DBCR0 = 0x41000000
cmdwin::reg General Purpose Registers/SP = 0x0000000F
2) Programming
fl::target -lc "NAND_IFC_Example-core00_RAM_P1010_Download"
fl::target -b 0x8000 0x40000
fl::target -v on -l on
cmdwin::fl::device -d "K9F5608Ux0D-IFC" -o "32Mx8x1" -a 0x0 0x1ffffff
cmdwin::fl::image -f "C:\\Users\\Frank\\Documents\\Freescale CodeWarrior Tools\\u-boot_nand.bin" -t "Auto Detect" -re on -r 0x0 0x1ffffff -oe on -o 0x0
cmdwin::fl::erase image
Beginning Operation ...
-------------------------
log: Trying auto-detect...
log: File is NOT of type Motorola S-Record Format.
log: File is NOT of type Elf Format.
Auto-detection is successful.
File is of type Binary/Raw Format.
log: Using Algorithm: K9F5608x0D-IFC.elf
log:
log:
log: ======================================================================
log: === Target Configuration Settings
log: === Launch Configuration: NAND_IFC_Example-core00_RAM_P1010_Download
log: ======================================================================
log: Connecting ...
Performing target initialization ...
log: Connected ...
log:
log: ======================================================================
log: === Execute: Erase
log: === Timestamp: Sun Jul 20 11:28:29 2014
log: === Flash Device: K9F5608Ux0D-IFC
log: === Flash Organization: 32Mx8x1
log: === Flash Mem Start Addr: 0x00000000
log: === Flash Mem End Addr: 0x01FFFFFF
log: ======================================================================
Downloading Flash Device Driver ...
log: Loading Flash Device Driver at: 0x00008000
log: Flash Driver Buffer is at: 0x0000C260
log: Flash Driver Buffer Size is: 0x0003BDA0
log:
log: Writing the Address
log: Writing the address of the sector list
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Reading flash ID ...
log: Reading init return status
log: Done
log:
log: Initialization Command Succeeded
log: Writing Erase Function Code
log: Writing the Address
log: Writing the Number of Sectors
log: Writing the address of the sector list
log: Writing the sector list
Erasing Sector 0x00000000 to 0x00003FFF
Erasing Sector 0x00004000 to 0x00007FFF
Erasing Sector 0x00008000 to 0x0000BFFF
Erasing Sector 0x0000C000 to 0x0000FFFF
Erasing Sector 0x00010000 to 0x00013FFF
Erasing Sector 0x00014000 to 0x00017FFF
Erasing Sector 0x00018000 to 0x0001BFFF
Erasing Sector 0x0001C000 to 0x0001FFFF
Erasing Sector 0x00020000 to 0x00023FFF
Erasing Sector 0x00024000 to 0x00027FFF
Erasing Sector 0x00028000 to 0x0002BFFF
Erasing Sector 0x0002C000 to 0x0002FFFF
Erasing Sector 0x00030000 to 0x00033FFF
Erasing Sector 0x00034000 to 0x00037FFF
Erasing Sector 0x00038000 to 0x0003BFFF
Erasing Sector 0x0003C000 to 0x0003FFFF
Erasing Sector 0x00040000 to 0x00043FFF
Erasing Sector 0x00044000 to 0x00047FFF
Erasing Sector 0x00048000 to 0x0004BFFF
Erasing Sector 0x0004C000 to 0x0004FFFF
Erasing Sector 0x00050000 to 0x00053FFF
Erasing Sector 0x00054000 to 0x00057FFF
Erasing Sector 0x00058000 to 0x0005BFFF
Erasing Sector 0x0005C000 to 0x0005FFFF
Erasing Sector 0x00060000 to 0x00063FFF
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Erasing ...
log: Reading erase return status
log: Done
Erase Command Succeeded
log: Timestamp: Sun Jul 20 11:28:34 2014
cmdwin::fl::write verify
-------------------------
Using restricted address range 0x00000000 to 0x01FFFFFF
Programming file C:\Users\Frank\Documents\Freescale CodeWarrior Tools\u-boot_nand.bin
log: Trying auto-detect...
log: File is NOT of type Motorola S-Record Format.
log: File is NOT of type Elf Format.
Auto-detection is successful.
File is of type Binary/Raw Format.
log: Using Algorithm: K9F5608x0D-IFC.elf
log:
log: ======================================================================
log: === Execute: Program
log: === Timestamp: Sun Jul 20 11:28:34 2014
log: === Flash Device: K9F5608Ux0D-IFC
log: === Flash Organization: 32Mx8x1
log: === Flash Mem Start Addr: 0x00000000
log: === Flash Mem End Addr: 0x01FFFFFF
log: ======================================================================
Downloading Flash Device Driver ...
log: Loading Flash Device Driver at: 0x00008000
log: Flash Driver Buffer is at: 0x0000C260
log: Flash Driver Buffer Size is: 0x0003BDA0
log:
log: Writing the Address
log: Writing the address of the sector list
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Reading flash ID ...
log: Reading init return status
log: Done
log:
log: Initialization Command Succeeded
log: Trying auto-detect...
log: File is NOT of type Motorola S-Record Format.
log: File is NOT of type Elf Format.
Auto-detection is successful.
File is of type Binary/Raw Format.
Downloading 0x00010000 bytes to be programmed at 0x00000000
Downloading 0x00010000 bytes to be programmed at 0x00010000
Downloading 0x00010000 bytes to be programmed at 0x00020000
log: Programming 0x00010000 bytes of Target Memory at 0x00000000
log: Writing Program Function Code
log: Writing the Address
log: Writing the Size
log: Writing the address of the buffer
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Executing program with verify ....
log: Reading program return status
Program with Verify Command Succeeded
Downloading 0x00010000 bytes to be programmed at 0x00030000
Downloading 0x00010000 bytes to be programmed at 0x00040000
Downloading 0x00010000 bytes to be programmed at 0x00050000
Downloading 0x00000C88 bytes to be programmed at 0x00060000
log: Programming 0x00000C88 bytes of Target Memory at 0x00030000
log: Writing Program Function Code
log: Writing the Address
log: Writing the Size
log: Writing the address of the buffer
log: Clearing the status
log: Setting up Registers
log: Commanding target to run
Executing program with verify ....
log: Reading program return status
Program with Verify Command Succeeded
log: Programmed total of 0x00060C88 bytes
log:
log: Timestamp: Sun Jul 20 11:28:41 2014
3) Board boot
NAND boot... skipping
U-Boot 2010.12-00063-g8669298-dirty (Jul 09 2011 - 12:42:30)
CPU: P1010E, Version: 1.0, (0x80f90010)
Core: E500, Version: 5.1, (0x80212151)
Clock Configuration:
CPU0:800 MHz,
CCB:400 MHz,
DDR:333.333 MHz (666.667 MT/s data rate) (Asynchronous), IFC:100 MHz
L1: D-cache 32 kB enabled
I-cache 32 kB enabled
Board: P1010RDB
I2C: ready
SPI: ready
DRAM: Detected UDIMM(s)
1 GiB (DDR3, 32-bit, CL=5, ECC off)
FLASH: *** failed ***
### ERROR ### Please RESET the board ###
- every time I reset I get the exact same boot messages.
Frank
Hi Yiping,
I was verifying the jumper settings on the P1010RDB and I noticed that I must have changed J34 from the default position as listed on the schematic. I changed J34 back to position 2-3 (Default) and it appears I can boot from NAND flash now. I have more testing to completely verify but it looks promising. Not sure why J34 would have any effect on a NAND boot when schematically it appears as only connected to the NOR flash?
Frank
Hello Frank,
There is no error in the flash programmer log. In the u-boot log, it just fails at NOR Flash detecting, you could compare the error log with the successful boot log, so J34 connect configuration is needed.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------