Cannot program P1022DS NAND

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

Cannot program P1022DS NAND

1,021 Views
stevensnyder
Contributor II

Eventually I want to write U-Boot for P1022DS NAND flash, but for now I cant even get an imported bareboard app to work.

I imported the P1022DS project and opted to build for ROM, built the code, then created a Flash Programmer target task using the standard P1022DS init script and memory file.  When I attempt to write the test app to flash I get this:

=======================================================

fl::target -lc "P1022-NAND-UBoot-core00_ROM_P1022_Attach"

fl::target -b 0x0 0x40000

fl::target -v off -l off

cmdwin::fl::device -d "NAND08GW3B2C-eLBC" -o "1024Mx8x1" -a 0x0 0x3fffffff

cmdwin::fl::erase all

Beginning Operation ...   

-------------------------

Chip erase not supported. Erasing sector by sector.  

Performing target initialization ...   

Downloading Flash Device Driver ...  

Reading flash ID .......

Error:  The algorithm was not able to run on the target or the flash is not configured properly.

Error:  Getting flash ID failed

Error: The algorithm was not able to run on the target or the flash is not configured properly.

=======================================================

FWIW, this is with CodeWarrior v10.5.1.  That NAND device is the correct one, at least according to the P1022DS schematic.  And I've verified that the P1022DS DIP switch are set correctly for NAND boot:

NAND boot:

SW4[5:8] = 1010

SW7[1:2] = 01

This seems to be as plain-vanilla as can be yet I can't write to NAND.  What do I need to do to make this work?

Thanks.

Labels (1)
0 Kudos
Reply
5 Replies

835 Views
stevensnyder
Contributor II

> You could use TFTP and U-Boot NAND commands subsystem

Unfortunately installation via U-Boot isn't an option.  I'm testing on a P1022 eval board to get an understanding of how our code will actually be installed on our own P1013-based board.

That board doesn't have U-Boot, or any other software, installed.  So my only option for initial installation of boot code in NAND involves the use of the CW probe.  Somehow.

0 Kudos
Reply

835 Views
ufedor
NXP Employee
NXP Employee

Please use use "RAM" build option and "Connect" as CW Target Connection for the Flash Programmer.

0 Kudos
Reply

835 Views
ufedor
NXP Employee
NXP Employee

> opted to build for ROM

It is needed to use "RAM" option and "Connect" because Target Connection with "ROM" and "Attach" does not initialize SDRAM to comply with specified Target RAM settings (fl::target -b 0x0 0x40000).

0 Kudos
Reply

835 Views
stevensnyder
Contributor II

If I opt for a RAM build and Connect, then won't I just be running my code out of the DDR memory? 

What do I have to do to get the code into NAND such I can boot to it without the CW probe being attached to the board?

Thanks.

0 Kudos
Reply

835 Views
ufedor
NXP Employee
NXP Employee

> If I opt for a RAM build and Connect, then won't I just be running my code out of the DDR memory?

No.

This type of target connection only executes the board configuration script containg DDR initialization sequence - i.e. the project code is not loaded.

> What do I have to do to get the code into NAND such I can boot to it without the CW probe being attached to the board?

You could use TFTP and U-Boot NAND commands subsystem ( UBootCmdGroupNand < DULG < DENX ) to write downloaded U-Boot image to the NAND Flash starting from address 0.

0 Kudos
Reply