Pogoplug v2 (pink) / Jtag / OpenOCD / Buspirate

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Pogoplug v2 (pink) / Jtag / OpenOCD / Buspirate

Postby Niii » Fri May 13, 2011 9:57 pm

Hi,
I'm coming on this forum for get help for connected a buspirate to a pogoplug pink, and for a start, recognized cpu .

So the story.
I have bought a pogoplug V2 for install another OS.
After some tests, at boot I got some message error about bad blocks on nand.

I decided to launch the command "nand scrub" (really clean NAND erasing bad blocks (UNSAFE)).
On next reboot, no uboot on rs232, no led activity, ok my pogo is bricked :|.

Now i try to connect a Buspirate to jtag for reflash uboot, but OpenOCD do not want to recognize feroceon cpu.

Buspirate version : (openocd won't work with 5.x firmware)
HiZ>i
Bus Pirate v3
Firmware v4.5 Bootloader v4.4
DEVID:0x0447 REVID:0x3043 (B5)
http://dangerousprototypes.com

Jtag Pogoplug pink :
Power connector
-----------
GND
TDI
SRST
TDO
CLK
TMS
RES
3.3
-----------
Rs232 connector

Wiring :
BP - JTAG
3.3v - 3.3v
VPU - VTref(3v3)
GND - GND
MOSI - TDI
MISO - TDO
CLK - TCK
CS - TMS

Buspirate.cfg :
interface buspirate
buspirate_port /dev/ttyUSB0
buspirate_speed fast ;# or normal
buspirate_vreg 0
buspirate_mode open-drain
buspirate_pullup 1
reset_config srst_only

I power on my Buspirate and launch command : openocd -f sheevaplug.cfg

Here output :
Open On-Chip Debugger 0.5.0-dev-00873-g289cece-dirty (2011-05-09-22:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
500 kHz
adapter_nsrst_delay: 500
dcc downloads are enabled
Warn : use 'feroceon.cpu' as target identifier, not '0'
sheevaplug_load_uboot
Info : Buspirate switched to FAST mode
Info : Buspirate Interface ready!
Info : Want to set speed to 500kHz, but not implemented yet
Error: Translation from jtag_speed to khz not implemented
Info : adapter-specific clock speed value 500
Info : JTAG tap: feroceon.cpu tap/device found: 0x000000ff (mfg: 0x07f, part: 0x0000, ver: 0x0)
Warn : JTAG tap: feroceon.cpu UNEXPECTED: 0x000000ff (mfg: 0x07f, part: 0x0000, ver: 0x0)
Error: JTAG tap: feroceon.cpu expected 1 of 1: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Error: Trying to use configured scan chain anyway...
Error: feroceon.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Error: unexpected Feroceon EICE version signature

Other question, i need to power off my Buspirate berfore relaunch openOCD, if not, OpenOCD fail with this, its normal ? :
Error: Error reading data
Error: Buspirate error. Is is binary//OpenOCD support enabled?

If anyone have a solution, or see a mistake.
Regards.
Niii
 
Posts: 3
Joined: Fri May 13, 2011 9:28 pm

Re: Pogoplug v2 (pink) / Jtag / OpenOCD / Buspirate

Postby Niii » Sat May 14, 2011 3:56 pm

I made a mistake.
Here is the good wiring :
BP - JTAG
AUX - RES
GND - GND
MOSI - TDI
MISO - TDO
CLK - TCK
CS - TMS

OpenOCD boot are ok :
$this->bbcode_second_pass_code('', 'Open On-Chip Debugger 0.5.0-dev-00873-g289cece-dirty (2011-05-09-22:24)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Warn : Adapter driver 'buspirate' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
srst_only separate srst_gates_jtag srst_open_drain
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
500 kHz
adapter_nsrst_delay: 500
dcc downloads are enabled
Warn : use 'feroceon.cpu' as target identifier, not '0'
sheevaplug_load_uboot
Info : Buspirate Interface ready!
Info : Want to set speed to 500kHz, but not implemented yet
Error: Translation from jtag_speed to khz not implemented
Info : adapter-specific clock speed value 500
Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Info : accepting 'telnet' connection from 4444')

Halt / init / nand / erase are ok too :
$this->bbcode_second_pass_code('', '>halt
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
>init
>sheevaplug_init
> nand probe 0
NAND flash device 'NAND 128MiB 3.3V 8-bit (Hynix)' found
> nand erase 0 0x0 0xa0000
erased blocks 0 to 5 on NAND flash device #0 'NAND 128MiB 3.3V 8-bit'')

But write on nand or load_image fail :
With arm7_9 dcc_downloads enable :
$this->bbcode_second_pass_code('', '> load_image uboot.kwb 0x800000
Halt timed out, wake up GDB.
timed out while waiting for target halted
in procedure 'load_image'')
or
$this->bbcode_second_pass_code('', '> load_image uboot.kwb
DCC write failed, expected end address 0x00080000 got 0x7f7f7f7f
in procedure 'load_image'')

Without :
$this->bbcode_second_pass_code('', '> load_image uboot.kwb 0x800000
timeout waiting for SYSCOMP & DBGACK, last DBG_STATUS: 0
in procedure 'load_image'')

If anyone have a track.
Regards.
Niii
 
Posts: 3
Joined: Fri May 13, 2011 9:28 pm

Re: Pogoplug v2 (pink) / Jtag / OpenOCD / Buspirate

Postby Niii » Sat May 14, 2011 8:47 pm

Ok after some reset / load_image / write / nand erase, got no error.

Just this error when I want write uboot :
$this->bbcode_second_pass_code('', '> nand write 0 uboot.kwb 0 oob_softecc_kw
memory write caused data abort (address: 0x10000014, size: 0x4, count: 0x10)
Unable to write OOB data to NAND device

> mdw 0x10000014
memory read caused data abort (address: 0x10000014, size: 0x4, count: 0x1)')
Make change in sheevaplug.cfg
Change "-work-area-phys 0x10000000 \" to "-work-area-phys 0x100000 \"

Relaunch OpenOCD, and now :
$this->bbcode_second_pass_code('', '> nand erase 0 0x0 0xa0000
erased blocks 0 to 5 on NAND flash device #0 'NAND 128MiB 3.3V 8-bit'
> nand write 0 uboot.j.kwb 0 oob_softecc_kw
>reset
')
In rs232 screen :
$this->bbcode_second_pass_code('', 'U-Boot 2010.09 (Oct 23 2010 - 11:51:16)
Marvell-PinkPogo by Jeff Doozan

SoC: Kirkwood 88F6281_A0
DRAM: 256 MiB
NAND: 128 MiB
*** Warning - bad CRC or NAND, using default environment

In: serial
Out: serial
Err: serial
Net: egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot: 0
Marvell>> ')

Time to take a break.
Niii
 
Posts: 3
Joined: Fri May 13, 2011 9:28 pm

Re: Pogoplug v2 (pink) / Jtag / OpenOCD / Buspirate

Postby davygravy » Mon Feb 20, 2012 2:14 am

Yes, JTAG is great when it works, a source of consternation when it does less than work...

I used OpenOCD 0.5.0, built against libftdi, on Ubuntu Lucid 10.04, with my ARM-USB-TINY.

This article was indispensable for me : http://plume.redox.ws/article13/docksta ... -buspirate

My script for the PogoPlugV2 Board is attached... pheeewwww.... I had to press the tiny reset button on the board when I experienced the Halt timed out, wake up GDB. message. Subsequent dockstar_init invocations then worked a treat...

$this->bbcode_second_pass_code('', '> reset
reset
JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
> dockstar_init
dockstar_init
Halt timed out, wake up GDB.
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> dockstar_init
dockstar_init
> nand probe 0
nand probe 0
NAND flash device 'NAND 128MiB 3.3V 8-bit (Hynix)' found
> nand erase 0 0x0 0xa0000
nand erase 0 0x0 0xa0000
erased blocks 0 to 5 on NAND flash device #0 'NAND 128MiB 3.3V 8-bit'
> nand write 0 uboot.mtd0.pinkpogo.original.kwb 0 oob_softecc_kw
nand write 0 uboot.mtd0.pinkpogo.original.kwb 0 oob_softecc_kw
')

$this->bbcode_second_pass_code('', 'U-Boot 1.1.4 (Sep 28 2009 - 11:55:23) Cloud Engines v2.0 (3.4.16)

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 00690D60

Soc: 88F6281 A0 (DDR2)
CPU running @ 0Mhz L2 running @ 0Mhz
SysClock = 0Mhz , TClock = 200Mhz

')
Dang, it took several power-downs to get it to come back up on serial. :evil:

:)
dockstar.cfg.tar.gz
the board config I used to recover my PogoPlug V2 Pink E02
(1.69 KiB) Downloaded 910 times
davygravy
 
Posts: 27
Joined: Wed Jan 25, 2012 1:50 am

Re: Pogoplug v2 (pink) / Jtag / OpenOCD / Buspirate

Postby sambul13 » Sun Nov 04, 2012 2:19 pm

$this->bbcode_second_pass_quote('davygravy', 'J')TAG is great when it works, a source of consternation when it does less than work.
Just wanted to mention that before attemting to JTAG your Plug, one may want to try first reflashing its broken Uboot from a Linux PC with kwboot tool via Serial cable.
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 1 guest