[U-Boot] [MPC8272ADS/BDI2000]Can not program my u-boot into Flash

Hi everybody !
I am currently trying to flash u-boot into my MPC8272ADS board, but it is not working. When I am launching the "PROG" command, it tells: "Programming u-boot.bin , please wait .... # Programming flash memory failed at 0x00000000"
I also tried to launch:
prog 0xFF800000 u-boot.bin
Programming u-boot.bin , please wait .... # Programming flash memory failed at 0xff800002
Erasing my flash is OK. Erasing flash at 0xff800000 Erasing flash at 0xff840000 Erasing flash at 0xff880000 Erasing flash at 0xff8c0000 Erasing flash at 0xff900000 Erasing flash at 0xff940000 Erasing flash at 0xff980000 [...] Erasing flash at 0xffec0000 Erasing flash at 0xfff00000 Erasing flash at 0xfff40000 Erasing flash at 0xfff80000 Erasing flash at 0xfffc0000 Erasing flash passed
Please find my config file attached. Thx & Best Regards JM

Jean-Michel Hautbois wrote:
Hi everybody !
I am currently trying to flash u-boot into my MPC8272ADS board, but it is not working. When I am launching the "PROG" command, it tells: "Programming u-boot.bin , please wait .... # Programming flash memory failed at 0x00000000"
[snip]
Please find my config file attached. Thx & Best Regards JM
Hi JM,
Try disabling the workspace line: ;no;WORKSPACE 0x04700000 ;workspace in target RAM for fast download
The workspace significantly speeds up programming by copying a helper routine into RAM and then running that instead of bit-banging the writes through the JTAG port. The downside is that you have to have your RAM properly configured for it to work. Odds are pretty good this is biting you.
If disabling the workspace works, you are on your way. If and when you need (want) more programming speed, you will have to figure out what is misconfigured.
Personally, I only load the first u-boot (and an occasional oops-brick fix) via JTAG. I program all successive u-boots via u-boot itself, so I generally don't bother with the workspace.
HTH, gvb

2009/1/19 Jerry Van Baren gerald.vanbaren@ge.com:
Jean-Michel Hautbois wrote:
Hi everybody !
I am currently trying to flash u-boot into my MPC8272ADS board, but it is not working. When I am launching the "PROG" command, it tells: "Programming u-boot.bin , please wait .... # Programming flash memory failed at 0x00000000"
[snip]
Please find my config file attached. Thx & Best Regards JM
Hi JM,
Try disabling the workspace line: ;no;WORKSPACE 0x04700000 ;workspace in target RAM for fast download
The workspace significantly speeds up programming by copying a helper routine into RAM and then running that instead of bit-banging the writes through the JTAG port. The downside is that you have to have your RAM properly configured for it to work. Odds are pretty good this is biting you.
If disabling the workspace works, you are on your way. If and when you need (want) more programming speed, you will have to figure out what is misconfigured.
Personally, I only load the first u-boot (and an occasional oops-brick fix) via JTAG. I program all successive u-boots via u-boot itself, so I generally don't bother with the workspace.
HTH, gvb
OK, I tried another configuration file from the abatron site, and I am getting the same problem (see the file attached). Removing the workspace doesn't change anything.
What seems curious to me, is : ">prog 0xFF900000 u-boot.bin Programming u-boot.bin , please wait .... # Programming flash memory failed at 0xff900002"
I don't understand why asking for writing into 0xFF900000 it is trying to write into 0xFF980002... I tried different bus width too...
JM

2009/1/19 Jean-Michel Hautbois jhautbois@gmail.com:
2009/1/19 Jerry Van Baren gerald.vanbaren@ge.com:
Jean-Michel Hautbois wrote:
Hi everybody !
I am currently trying to flash u-boot into my MPC8272ADS board, but it is not working. When I am launching the "PROG" command, it tells: "Programming u-boot.bin , please wait .... # Programming flash memory failed at 0x00000000"
[snip]
Please find my config file attached. Thx & Best Regards JM
Hi JM,
Try disabling the workspace line: ;no;WORKSPACE 0x04700000 ;workspace in target RAM for fast download
The workspace significantly speeds up programming by copying a helper routine into RAM and then running that instead of bit-banging the writes through the JTAG port. The downside is that you have to have your RAM properly configured for it to work. Odds are pretty good this is biting you.
If disabling the workspace works, you are on your way. If and when you need (want) more programming speed, you will have to figure out what is misconfigured.
Personally, I only load the first u-boot (and an occasional oops-brick fix) via JTAG. I program all successive u-boots via u-boot itself, so I generally don't bother with the workspace.
HTH, gvb
Please find the file attached... :)
Best Regards, JM

2009/1/19 Jean-Michel Hautbois jhautbois@gmail.com: 2009/1/19 Jean-Michel Hautbois jhautbois@gmail.com:
2009/1/19 Jerry Van Baren gerald.vanbaren@ge.com:
Jean-Michel Hautbois wrote:
Hi everybody !
I am currently trying to flash u-boot into my MPC8272ADS board, but it is not working. When I am launching the "PROG" command, it tells: "Programming u-boot.bin , please wait .... # Programming flash memory failed at 0x00000000"
[snip]
Please find my config file attached. Thx & Best Regards JM
Hi JM,
Try disabling the workspace line: ;no;WORKSPACE 0x04700000 ;workspace in target RAM for fast download
The workspace significantly speeds up programming by copying a helper routine into RAM and then running that instead of bit-banging the writes through the JTAG port. The downside is that you have to have your RAM properly configured for it to work. Odds are pretty good this is biting you.
If disabling the workspace works, you are on your way. If and when you need (want) more programming speed, you will have to figure out what is misconfigured.
Personally, I only load the first u-boot (and an occasional oops-brick fix) via JTAG. I program all successive u-boots via u-boot itself, so I generally don't bother with the workspace.
HTH, gvb
Please find the file attached... :)
Best Regards, JM
The error in programming tells that it couldn't write the second byte of the u-boot file. Indeed, I have displayed the memory before and after the prog command, and the first byte is correctly written. I can't understand where my problem is.
Thx and Regards, JM

Jean-Michel Hautbois wrote:
[snip]
The error in programming tells that it couldn't write the second byte of the u-boot file. Indeed, I have displayed the memory before and after the prog command, and the first byte is correctly written. I can't understand where my problem is.
Thx and Regards, JM
Hi JM,
After you erase the sector/chip, is it all 0xFF (especially the second location)? (I expect it is, but it is good to start with the fundamentals.)
If so, I would speculate your flash chip configuration isn't right. You need to know how your hardware is wired: * How many chips in parallel on the bus? * Bus width on each chip? * Bus width into the processor?
Common configurations are things like one 8-bit wide chip running 8 bits into the processor, one 16-bit wide chip running 16 bits into the processor, two 16-bit wide chips in parallel running 32 bits into the processor.
(Some flash chips can be configured to be either 8 or 16 bits wide depending on a strapping pin. For them, you need to figure out how the hardware has them configured.)
Good luck, gvb

2009/1/19 Jerry Van Baren gerald.vanbaren@ge.com:
Jean-Michel Hautbois wrote:
[snip]
The error in programming tells that it couldn't write the second byte of the u-boot file. Indeed, I have displayed the memory before and after the prog command, and the first byte is correctly written. I can't understand where my problem is.
Thx and Regards, JM
Hi JM,
Hi Jerry, thx for answering
After you erase the sector/chip, is it all 0xFF (especially the second location)? (I expect it is, but it is good to start with the fundamentals.)
No, it is not. I would say, the first byte is OK (I don't have the board with me right now).
If so, I would speculate your flash chip configuration isn't right. You need to know how your hardware is wired:
- How many chips in parallel on the bus?
- Bus width on each chip?
- Bus width into the processor?
The Flash chip is a SIMM with 4 LH28F016SCT chips. When I try to use a 32 bits wide bus, it does not work.
JM

Jean-Michel Hautbois wrote:
2009/1/19 Jerry Van Baren gerald.vanbaren@ge.com:
Jean-Michel Hautbois wrote:
[snip]
The error in programming tells that it couldn't write the second byte of the u-boot file. Indeed, I have displayed the memory before and after the prog command, and the first byte is correctly written. I can't understand where my problem is.
Thx and Regards, JM
Hi JM,
Hi Jerry, thx for answering
After you erase the sector/chip, is it all 0xFF (especially the second location)? (I expect it is, but it is good to start with the fundamentals.)
No, it is not. I would say, the first byte is OK (I don't have the board with me right now).
OK, if the chip isn't erased properly, you aren't going to make any headway programming. You have to solve the erase problem first.
Is the block you are trying to erase locked?
If so, I would speculate your flash chip configuration isn't right. You need to know how your hardware is wired:
- How many chips in parallel on the bus?
- Bus width on each chip?
- Bus width into the processor?
The Flash chip is a SIMM with 4 LH28F016SCT chips. When I try to use a 32 bits wide bus, it does not work.
That implies the bus is 32 bits wide made up of 4 x8 chips in parallel. It is possible that it is wired 16 bits wide or 8 bits wide by 2 or 4 chips deep, but that is very unlikely.
Is this a stock Freescale eval board or is it custom h/w?
The config file you sent had: [FLASH] CHIPTYPE I28BX8 ; Flash type CHIPSIZE 0x200000 ; Single chip size (2 Mbyte) BUSWIDTH 8 ; total width for the whole SIMM ;WORKSPACE 0x7e000000 ;workspace in target RAM for fast download FILE u-boot.bin FORMAT BIN 0xFF900000
Searching for the chip type picks up: http://www.datasheetcatalog.org/datasheet/Sharp/mXusvqq.pdf Searching for Abatron flash types picks up: http://www.abatron.ch/fileadmin/user_upload/products/pdf/flashsupp.pdf
OK, looks like you have the right chiptype.
The buswidth most likely needs to be 32. You said you tried this and it didn't work.
Running low on suggestions, but here goes... * Fix the buswidth in the config file and then cycle power on everything to make sure you have a clean new configuration (paranoia sometimes pays off) * Verify the SIMM is x32.
gvb

No, it is not. I would say, the first byte is OK (I don't have the board with me right now).
OK, if the chip isn't erased properly, you aren't going to make any headway programming. You have to solve the erase problem first.
Is the block you are trying to erase locked?
No
The Flash chip is a SIMM with 4 LH28F016SCT chips. When I try to use a 32 bits wide bus, it does not work.
That implies the bus is 32 bits wide made up of 4 x8 chips in parallel. It is possible that it is wired 16 bits wide or 8 bits wide by 2 or 4 chips deep, but that is very unlikely.
Is this a stock Freescale eval board or is it custom h/w?
This is a freescale board.
The config file you sent had: [FLASH] CHIPTYPE I28BX8 ; Flash type CHIPSIZE 0x200000 ; Single chip size (2 Mbyte) BUSWIDTH 8 ; total width for the whole SIMM ;WORKSPACE 0x7e000000 ;workspace in target RAM for fast download FILE u-boot.bin FORMAT BIN 0xFF900000
Searching for the chip type picks up: http://www.datasheetcatalog.org/datasheet/Sharp/mXusvqq.pdf Searching for Abatron flash types picks up: http://www.abatron.ch/fileadmin/user_upload/products/pdf/flashsupp.pdf
OK, looks like you have the right chiptype.
The buswidth most likely needs to be 32. You said you tried this and it didn't work.
No, it didn't. It just said that erasing was not working. I will tell you more tomorrow.
Running low on suggestions, but here goes...
- Fix the buswidth in the config file and then cycle power on everything to
make sure you have a clean new configuration (paranoia sometimes pays off)
What do you mean by "cycle power on everything" ?
- Verify the SIMM is x32.
Huh ? How ?
JM

Jean-Michel Hautbois wrote:
No, it is not. I would say, the first byte is OK (I don't have the board with me right now).
OK, if the chip isn't erased properly, you aren't going to make any headway programming. You have to solve the erase problem first.
Is the block you are trying to erase locked?
No
The Flash chip is a SIMM with 4 LH28F016SCT chips. When I try to use a 32 bits wide bus, it does not work.
That implies the bus is 32 bits wide made up of 4 x8 chips in parallel. It is possible that it is wired 16 bits wide or 8 bits wide by 2 or 4 chips deep, but that is very unlikely.
Is this a stock Freescale eval board or is it custom h/w?
This is a freescale board.
OK, Freescale engineers on/off the list should be able to help. This really shouldn't be hard.
The config file you sent had: [FLASH] CHIPTYPE I28BX8 ; Flash type CHIPSIZE 0x200000 ; Single chip size (2 Mbyte) BUSWIDTH 8 ; total width for the whole SIMM ;WORKSPACE 0x7e000000 ;workspace in target RAM for fast download FILE u-boot.bin FORMAT BIN 0xFF900000
Searching for the chip type picks up: http://www.datasheetcatalog.org/datasheet/Sharp/mXusvqq.pdf Searching for Abatron flash types picks up: http://www.abatron.ch/fileadmin/user_upload/products/pdf/flashsupp.pdf
OK, looks like you have the right chiptype.
The buswidth most likely needs to be 32. You said you tried this and it didn't work.
No, it didn't. It just said that erasing was not working. I will tell you more tomorrow.
Running low on suggestions, but here goes...
- Fix the buswidth in the config file and then cycle power on everything to
make sure you have a clean new configuration (paranoia sometimes pays off)
What do you mean by "cycle power on everything" ?
The Abatron picks up its configuration file via TFTP (IIRC, otherwise FTP) from the host. You need to fix the file on the host so it has the x32 configuration. After fixing the file on the host, you need to reset/cycle power on the Abatron so it re-reads the config file, otherwise it will be using the old (wrong) config file.
Sometimes I forget <rolls eyes>. Major confusion ensues, followed by a facepalm moment. http://www.facepalm.org/
- Verify the SIMM is x32.
Huh ? How ?
It's x32 unless I'm really confused.
JM
gvb

OK, Freescale engineers on/off the list should be able to help. This really shouldn't be hard.
I hope so :)
Running low on suggestions, but here goes...
- Fix the buswidth in the config file and then cycle power on everything
to make sure you have a clean new configuration (paranoia sometimes pays off)
What do you mean by "cycle power on everything" ?
The Abatron picks up its configuration file via TFTP (IIRC, otherwise FTP) from the host. You need to fix the file on the host so it has the x32 configuration. After fixing the file on the host, you need to reset/cycle power on the Abatron so it re-reads the config file, otherwise it will be using the old (wrong) config file.
Sometimes I forget <rolls eyes>. Major confusion ensues, followed by a facepalm moment. http://www.facepalm.org/
OK, I can understand what you meant ;)
- Verify the SIMM is x32.
Huh ? How ?
It's x32 unless I'm really confused.
Yes, I mean, how can I *verify* that it is x32 ?
Thx again. Regards JM

Jean-Michel Hautbois wrote:
[snip]
- Verify the SIMM is x32.
Huh ? How ?
It's x32 unless I'm really confused.
Yes, I mean, how can I *verify* that it is x32 ?
Thx again. Regards JM
It's in the manual: http://www.freescale.com/files/32bit/doc/user_guide/MPC8272ADSUG.pdf?fpsp=1&WT_TYPE=Reference%20Manuals&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MPC8272ADS&nodeId=018rH3bTdG2977&fpsp=1&tab=Documentation_Tab
Chapter 1, Table 1-1 Flash Memory SIMM (PPC bus) 8 MByte, 32 bits wide expandable to 32 MBytes
Good luck, gvb

Dear Jerry Van Baren,
In message 4974E213.9030703@ge.com you wrote:
What do you mean by "cycle power on everything" ?
The Abatron picks up its configuration file via TFTP (IIRC, otherwise FTP) from the host. You need to fix the file on the host so it has the x32 configuration. After fixing the file on the host, you need to
No need to do that. For testing, you can change the flash configuration of the BDI interactively using the "flash" command:
FLASH <type> <size> <bus> change flash configuration
reset/cycle power on the Abatron so it re-reads the config file,
Even if you need to reread the config file, power-cycling of the BDI is not needed. Execute the "boot" command instead to reboot the BDI.
Best regards,
Wolfgang Denk

2009/1/19 Wolfgang Denk wd@denx.de:
Dear Jerry Van Baren,
In message 4974E213.9030703@ge.com you wrote:
What do you mean by "cycle power on everything" ?
The Abatron picks up its configuration file via TFTP (IIRC, otherwise FTP) from the host. You need to fix the file on the host so it has the x32 configuration. After fixing the file on the host, you need to
No need to do that. For testing, you can change the flash configuration of the BDI interactively using the "flash" command:
FLASH <type> <size> <bus> change flash configuration
reset/cycle power on the Abatron so it re-reads the config file,
Even if you need to reread the config file, power-cycling of the BDI is not needed. Execute the "boot" command instead to reboot the BDI.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de We are Microsoft. Unix is irrelevant. Openness is futile. Prepare to be assimilated.
OK, found my problem... I feel ashamed... I specified my flash like this: flash I28BX8 0x200000 32
Then I have *unlocked* and erase... It worked...
Sorry for having passed such a time for this. JM
participants (3)
-
Jean-Michel Hautbois
-
Jerry Van Baren
-
Wolfgang Denk