Re: [Openocd-development] Can't halt Calao USB A9263 with OpenOCD 0.5.0

2011-11-03 Thread Thomas Petazzoni
Hello,

Any idea on this JTAG problem on Calao USB A9263 ?

Thanks!

Thomas

Le Mon, 31 Oct 2011 23:52:18 +0100,
Thomas Petazzoni thomas.petazz...@free-electrons.com a écrit :

 Hello,
 
 (Resending to the list @berlios.de since the list
 @lists.sourceforge.net doesn't seem to work)
 
 I am trying to use OpenOCD 0.5.0 on the Calao USB A9263 board. This
 board is based on the AT91SAM9263 SoC and uses a built-in FTDI 2232 to
 provide USB access to the JTAG interface.
 
 The problem is that OpenOCD is not able to halt the target (I'm trying
 to halt while the board runs U-Boot, so there is no Linux running
 doing some crazy power management stuff). Here is what I get on the
 telnet interface:
 
 $ telnet localhost 
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 Open On-Chip Debugger
  halt  
 Halt timed out, wake up GDB.
 timed out while waiting for target halted
 in procedure 'halt'
  halt  
 Halt timed out, wake up GDB.
 timed out while waiting for target halted
 in procedure 'halt'
 
 Here is what I see on OpenOCD output:
 
 $ ../src/openocd -f ./interface/calao-usb-a9263.cfg 
 Open On-Chip Debugger 0.5.0 (2011-10-31-11:55)
 Licensed under GNU GPL v2
 For bug reports, read
   http://openocd.berlios.de/doc/doxygen/bugs.html
 Info : only one transport option; autoselect 'jtag'
 adapter_nsrst_delay: 200
 jtag_ntrst_delay: 200
 trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
 adapter_nsrst_delay: 300
 jtag_ntrst_delay: 200
 RCLK - adaptive
 1
 Info : RCLK (adaptive clock speed) not supported - fallback to 3 kHz
 Info : JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg:
 0x01f, part: 0x7926, ver: 0x0) Info : Embedded ICE version 15
 Error: unknown EmbeddedICE version (comms ctrl: 0xfffe)
 Info : at91sam9263.cpu: hardware has 2 breakpoint/watchpoint units
 Info : accepting 'telnet' connection from 
 Info : Halt timed out, wake up GDB.
 Error: timed out while waiting for target halted
 in procedure 'halt'
 Info : Halt timed out, wake up GDB.
 Error: timed out while waiting for target halted
 in procedure 'halt'
 
 And here is the config file I'm using
 (interface/calao-usb-a9263.cfg) :
 
 $ cat interface/calao-usb-a9263.cfg 
 #
 # CALAO Systems USB-A9263
 #
 # http://www.calao-systems.com/
 #
 
 interface ft2232
 ft2232_layout jtagkey
 ft2232_device_desc USB-A9263
 ft2232_vid_pid 0x0403 0x6010
 adapter_nsrst_delay 200
 jtag_ntrst_delay 200
 script target/at91sam9263.cfg
 
 In case it is useful, I have attached the output of openocd started in
 debug mode.
 
 Do you have any clue of what's going on ?
 
 Thanks!
 
 Thomas



-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Can't halt Calao USB A9263 with OpenOCD 0.5.0

2011-11-03 Thread freddie_chopin
1. Try changing the speed of JTAG to be 1/8th of core speed.
2. Try doing reset halt from the telnet first.
3. Make sure your board has the same reset configuration as you pass to OpenOCD 
- separate lines of TRST and SRST.

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Can't halt Calao USB A9263 with OpenOCD 0.5.0

2011-11-03 Thread Thomas Petazzoni
Hello,

Thanks for your feedback!

Le Thu, 03 Nov 2011 09:27:49 +0100,
freddie_chopin freddie_cho...@op.pl a écrit :

 1. Try changing the speed of JTAG to be 1/8th of core speed.

I have tried with adapter_khz 5 or jtag_rclk 2, and not better. Since
the JTAG is capable of finding the tap/device, doesn't that mean that
the communication is working, and thus that the jtag speed is correct?

 2. Try doing reset halt from the telnet first.

It does reboot the board, but still can't halt the target. Output of
the telnet connection:

$ telnet localhost 
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
 reset halt
JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg: 0x01f, part: 
0x7926, ver: 0x0)
timed out while waiting for target halted
TARGET: at91sam9263.cpu - Not halted

in procedure 'reset'


Output of OpenOCD:

$ ../src/openocd -f ./interface/calao-usb-a9263.cfg 
Open On-Chip Debugger 0.5.0 (2011-10-31-11:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 300
jtag_ntrst_delay: 200
RCLK - adaptive
RCLK - adaptive
Info : RCLK (adaptive clock speed) not supported - fallback to 2 kHz
Info : JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg: 0x01f, 
part: 0x7926, ver: 0x0)
Info : Embedded ICE version 15
Error: unknown EmbeddedICE version (comms ctrl: 0xfffe)
Info : at91sam9263.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'telnet' connection from 
Info : JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg: 0x01f, 
part: 0x7926, ver: 0x0)
Error: timed out while waiting for target halted
TARGET: at91sam9263.cpu - Not halted

in procedure 'reset'
^C

 3. Make sure your board has the same reset configuration as you pass
 to OpenOCD - separate lines of TRST and SRST.

From my reading of the schematics, it seems it does, but I'm not an expert. The 
schematics of
the USB A9263 are available at
http://www.calao-systems.com/repository/pub/EMBEDDED%20COMPUTERS/USB-A9263-XXX/C02/HARDWARE/SCH-7-B01.pdf
(FTDI 2232 routing is on page one).

Any other suggestion?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Can't halt Calao USB A9263 with OpenOCD 0.5.0

2011-11-03 Thread Thomas Petazzoni
Hello,

Le Thu, 03 Nov 2011 11:01:00 +0100,
freddie_chopin freddie_cho...@op.pl a écrit :

 What's the core speed of your chip?

It's a AT91SAM9263 at 180 Mhz.

 Probably something high, so try high speed of JTAG - 1000 kHz (1MHz)
 - 5kHz is really slow, rclk 2 should give something like 2MHz
 (6MHz / (2+1)), but I'm not sure what it will do if JTAG adapter does
 not support adaptive clocking (FT2232D does not).

jtag_rclk sets the clock to 2 khz (which I tested originally), so I
tried 2000 khz instead. Not better.

 You may also try reset_config srst_pulls_trst or other
 configurations...

Not better, unfortunately. Still the exact same behaviour. Here is my
interface file:

interface ft2232
ft2232_layout jtagkey
ft2232_device_desc USB-A9263
ft2232_vid_pid 0x0403 0x6010
adapter_nsrst_delay 200
jtag_ntrst_delay 200
reset_config srst_pulls_trst
script target/at91sam9263.cfg
jtag_rclk 2000

and the OpenOCD output:

$ ../src/openocd -f ./interface/calao-usb-a9263.cfg 
Open On-Chip Debugger 0.5.0 (2011-10-31-11:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
none srst_pulls_trst
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 300
jtag_ntrst_delay: 200
RCLK - adaptive
RCLK - adaptive
Info : RCLK (adaptive clock speed) not supported - fallback to 2000 kHz
Info : JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg: 0x01f, 
part: 0x7926, ver: 0x0)
Info : Embedded ICE version 15
Error: unknown EmbeddedICE version (comms ctrl: 0xfffe)
Info : at91sam9263.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'telnet' connection from 
Info : JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg: 0x01f, 
part: 0x7926, ver: 0x0)
Error: timed out while waiting for target halted
TARGET: at91sam9263.cpu - Not halted

in procedure 'reset'

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Can't halt Calao USB A9263 with OpenOCD 0.5.0

2011-11-03 Thread freddie_chopin
W dniu 2011-11-03 11:08:39 użytkownik Thomas Petazzoni 
thomas.petazz...@free-electrons.com napisał:
  You may also try reset_config srst_pulls_trst or other
  configurations...
 
 Not better, unfortunately. Still the exact same behaviour. Here is my
 interface file:
 
 none srst_pulls_trst
 trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

Notice that first you set srst_pulls_trst and then another config file sets 
that back to separate. Try adding the command to openocd call:
openocd -f ... -c reset_config trst_and_srst srst_pulls_trst

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Can't halt Calao USB A9263 with OpenOCD 0.5.0

2011-11-03 Thread Thomas Petazzoni
Le Thu, 03 Nov 2011 11:21:33 +0100,
freddie_chopin freddie_cho...@op.pl a écrit :

 Notice that first you set srst_pulls_trst and then another config
 file sets that back to separate. Try adding the command to openocd
 call: openocd -f ... -c reset_config trst_and_srst srst_pulls_trst

Ah, right. Unfortunately, it is not better:

$ sudo ../src/openocd -f ./interface/calao-usb-a9263.cfg -c reset_config 
trst_and_srst srst_pulls_trst
Open On-Chip Debugger 0.5.0 (2011-10-31-11:55)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
none srst_pulls_trst
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 300
jtag_ntrst_delay: 200
RCLK - adaptive
RCLK - adaptive
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
Info : RCLK (adaptive clock speed) not supported - fallback to 2000 kHz
Info : JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg: 0x01f, 
part: 0x7926, ver: 0x0)
Info : Embedded ICE version 15
Error: unknown EmbeddedICE version (comms ctrl: 0xfffe)
Info : at91sam9263.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'telnet' connection from 
Info : JTAG tap: at91sam9263.cpu tap/device found: 0x0792603f (mfg: 0x01f, 
part: 0x7926, ver: 0x0)
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after 
reset.
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
TARGET: at91sam9263.cpu - Not halted

in procedure 'reset'

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Can't halt Calao USB A9263 with OpenOCD 0.5.0

2011-11-03 Thread freddie_chopin
);

Sorry, no more ideas from my side... Maybe someone else will be able to help 
you.

Generally the code you are running on the chip can be somehow blocking JTAG 
access so, if you can, try halting chip with empty flash. I think (I'm not 
sure) that issuing poll command from telnet performs the check of 
communication...

Please provide a debug log (run OpenOCD with -d 3 option) - maybe there is 
something interesting...

4\/3!!
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development