Skip to main content.
Navigation:
DENX
>
DULG
>
FaqADS5121
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
DULG
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
DULG Home
BoardSelect
Manual
FAQ
Application Notes
Changes
Index
List of pages in DULG
Search
<!-- %SECTION0{name=FaqADS5121}% STX/Freescale ADS5121 Board --> ---+!! STX/Freescale ADS5121 Board %TOC% ---+++ Incorrect ALE timings Problem:: [CPU Rev. 2: PVR 0x80862010, SVR 0x80180020] Attempts to program the flash memory (including for example using the ="saveenv"= command) fail silently: the code that gets written to flash is corrupted. %BR% This also applies for attempts to program the flash memory using a JTAG debugger like the Abatron BDI3000. Solution:: The problem is caused by incorrect (for this CPU revision) ALE timing for the CS0 and CS2 chip selects. The problem is fixed by U-Boot version v1.3.4-254-g8a49042 (git commit ID 8a490422bed6, released Thu Aug 28 13:17:07 2008) or later. Workaround:: To fix the problem temporarily (i. e. until the next reset of the board) you can use the following command in U-Boot: %BR% %X% Make sure to type the commands exactly as listed here! <verbatim> => mw 0x80010034 5 </verbatim> For a permanent fix, run the following commands in U-Boot: <verbatim> => mw 0x80010034 5 => setenv preboot 'mw 0x80010034 5;echo;echo Type \\"run flash_nfs\\" to mount root filesystem over NFS;echo' => saveenv => saveenv </verbatim> %BR% To enable flash programming with the BDI2000/3000 JTAG debuggers, please make sure that the ="[INIT]"= section of your BDI config file contains the line <verbatim> WM32 0x80010034 0x0000005 ;ALE Timing for CS0 and CS2 </verbatim> Fixed:: on all boards shipping 03 Sep 2008 or later ---+++ Update U-Boot Image in Backup Flash %X% *Note:* The following actions are dangerous. You might brick your board if you make mistakes. Please do not continue unless you know exactly what you are doing. Problem:: You want to install a more recent version of U-Boot in the backup flash which shall be *loaded to the main flash* when you run the automatic recovery procedure. Solution:: power off the board, install (close) the backup jumper at P4, then power on again; interrupt the autoboot sequence by hitting a key while the count-down is running. Then enter the following commands: <verbatim> => tftp 200000 ads5121/u-boot.bin => erase ${u-boot_mn_addr} +${filesize} => cp.b 200000 ${u-boot_mn_addr} ${filesize} </verbatim> Then power off the board, remove (open) the backup jumper at P4, then power on again. Problem:: You want to install a more recent version of U-Boot in the backup flash which shall be *run* when you boot from the backup flash. %BR% %X% Note: this is a critical operation. Think twice if you *really* know what you are doing. Solution:: power off the board, install (close) the backup jumper at P4, then power on again; interrupt the autoboot sequence by hitting a key while the count-down is running. Then enter the following commands: <verbatim> => tftp 200000 ads5121/u-boot.bin => protect off FFF00000 +${filesize} => erase FFF00000 +${filesize} => cp.b 200000 FFF00000 ${filesize} => setenv u-boot_size ${filesize} => saveenv => saveenv </verbatim> Then power off the board, remove (open) the backup jumper at P4, then power on again. ---+++ Update CPLD Code Problem:: In some rare cases it may be necessary or advisable to update the CPLD code on the board. New versions of the CPLD code are available from the [[http://www.silicontkx.com/support/downloads.php][STX download page]]. %BR% %X% %RED% *WARNING:* this is a critical operation; you may damage your hardware! %ENDCOLOR% %BR% Think twice if you *really* know what you are doing. Requirements:: You need a JTAG programmer like the !ByteBlaster II or !ByteBlaster MV to program the CPLD. Please contact [[mailto:office@denx.de?subject=Please%20send%20information%20about%20ByteBlaster][DENX Computer Systems !GmbH]] if you need one. Preparations:: We need software to control the JTAG programmer, a BSDL description file for the CPLD used on the ADS5121 board, and the CPLD code (in Serial Vector Format). 1 Download and install the [[http://www.urjtag.org/][UrJTAG]] Universal JTAG Library, Server and Tools package: <verbatim> $ cd /usr/local/src $ wget http://ovh.dl.sourceforge.net/sourceforge/urjtag/urjtag-0.9.tar.gz $ tar -zxf urjtag-0.9.tar.gz $ cd urjtag-0.9 $ ./configure $ make $ sudo make install </verbatim> 1 Download the BSDL description file for the [[http://www.altera.com/support/devices/bsdl/max2/max2-index.jsp][Altera EPM570F256 CPLD]]: <verbatim> $ cd /tmp $ wget ftp://ftp.altera.com/outgoing/download/bsdl/EPM570F256.BSD $ sudo mkdir -p /usr/local/share/urjtag/altera/epm570f256 $ sudo mv EPM570F256.BSD /usr/local/share/urjtag/altera/epm570f256/ </verbatim> 1 Download the CPLD code from the [[http://www.silicontkx.com/support/downloads.php][STX download page]]. Note that this file comes in POF ( Programmer Object Format), but for the !UrJTAG tool we need it in SVF (Serial Vector Format). You can convert POF into SVF if you have access to the [[http://www.altera.com/support/kdb/solutions/rd07222008_677.html ][Altera tools]]. Alternatively, you can download the SVF-file from the DENX web page: <verbatim> $ cd /tmp $ wget http://www.denx.de/wiki/pub/DULG/FaqADS5121/ADS5121e_05_cpld_p1.svf </verbatim> 1 Plug the connector of the !ByteBlaster on connector P5 of your ADS5121 like this: %BR% <img src="%ATTACHURLPATH%/dsc00066.jpg" alt="How to connect the Byteblaster" width="400" height="300" /> 1 Power on your ADS5121 with at least the wall plug. Solution:: Now we can program the CPLD with the new code: <verbatim> $ sudo jtag jtag> cable ByteBlaster parallel 0x378 jtag> bsdl path /usr/local/share/urjtag/altera/epm570f256 jtag> detect jtag> print jtag> part 0 jtag> svf /tmp/ADS5121e_05_cpld_p1.svf progress jtag> quit </verbatim> Programming will take about 2 minutes. You can safely ignore the ``unimplemented mode 'ABSENT' for TRST'' message. * [[%ATTACHURL%/ADS5121e_05_cpld_p1.svf][ADS5121e_05_cpld_p1.svf]]: ADS5121 Board Rev. 4 CPLD Code Rev. 5