industrialNETworXnetx

Jörg Linsenmayer

Jörg Linsenmayer

Leuze electronic GmbH+Co.KG

| 07.05.2010 | 08:27 | 2 replies

Lauterbach script to program external flash over JTAG?

Hi,

we are using hitex and lauterbach jtag debuggers. Is there a cmm script file availabe for lauterbach to program external (parallel) flash connected to the hilscher netX?

For the hitex tantino we already have the possibility to use it as flash programmer.

I already read the lauterbach manual and started a cmm script file, but it aborts the programming with a cpu error. The lauterbach example contains the setting of some registers for flash wait states and chip select ports. Which registers do I have to change for the netX, using a intel nor flash on the memory interface with cs0?

Here is my cmm script file:

//setup system for flash programming
SYStem.CPU ARM926EJ
SYStem.Up

//create the flash information
FLASH.RESet
FLASH.create 1. 0xc0000000--0xc0800000 I28F200J3 WORD

//setup netX hardware (flash wait states and chip select)
//??TBD

//unlock the flash for programming
FLASH.UNLOCK ALL

//activate flash reprogram mode
FLASH.ReProgram ALL

//start download of binary file
Data.LOAD.auto ..\bin\*.bin

//deactivate flash reprogram mode
FLASH.ReProgram OFF

ENDDO

Help would be appreciated.

jlinsen

 

Andreas Jacob

Andreas Jacob

Hilscher Gesellschaft fuer Systemautomation mbH

| 17.05.2010 | 11:43

Hi jlinsen,

sorry, I do not have a script for flash programming but a question ;-)

Have you initialized the netX memory controller at first (e.g.DWORD at 0x100100 = 0x0103030F)?

Regards
AJ

M T

M T

Hilscher Gesellschaft für Systemautomation mbH

| 18.05.2010 | 07:28

First of all you will need to setup MEM_SRAM0_CTRL (Phys. Address=0x00100100) to be able to access the flash. Your script is missing this initialization.

Also you need to provide the flash sector size and bus width during Flash.Create.

See the following example for a 16Bit Intel Strataflash (16MB) and non optimized timings (slow):

//Setup Flash controller for Intel Strata 16Bit on CS0 @0xc0000000
data.set ASD:0x100100 %LONG 0x0103030F

flash.reset
flash.create  1. ASD:0xC0000000++0x0FFFFFF 0x20000 I28F200J3 WORD

flash.auto all
d.load.BINARY flash.bin ASD:0xC0000000
flash.auto off

Regards

MT

Login