Welcome! Log In Create A New Profile

Advanced

HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD

Posted by joerg_999 
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
December 18, 2019 10:19PM
Ray,

Quote

So anyway, I then switched the JTAG cable back to the bricked Pogoplug. Nada. I think that this unit had a hardware failure. The JTAG on it used to work but now it does not work anymore.

Quote
daviddyer
These machines are pretty solid, but the power supplies are not. Maybe you need to get a good power supply and try again.

I think David has a good idea. These units indeed have a not-so-good power supply. If you could, measure the power with multi-meter before spending more time on something else.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
January 04, 2020 03:04PM
The power supply is good, I metered it and also swapped with a good Pogoplug. I think this board just suddenly went bad. Odd coincidence, though. I flashed a new u-boot build that I am working on---and it never came back. Wierd that this board died dead at the exact same time I flashed a new uboot. It's dead, though...even JTAG doesn't work on it, but does work on another Pogoplug...so I know the JTAG cable & setup works.
**shrug** I guess I'll just keep the power supply and discard the rest.
Thanks for the suggestions & help.

In other news: Really odd things happen with trying to load a new uboot into memory vs. flashing it and then running it from the flash. Yeah, the DENX U-Boot people say that's not supported. But you'd really like to do u-boot development that way, to avoid the risk of bricking your device with a bad u-boot.

With the bodhi 2017 uboot in the flash, stop the boot and load the newly-built uboot.bin into ram and then jump to it. About 90% of the time it works with the DENX ftp://ftp.denx.de/pub/u-boot/u-boot-2019.10.tar.bz2 build. But only 1% of the time does this work on a build from bodhi's 2017 uboot. Older versions, like the 2010 & 2012 uboot work sometimes and fail sometimes.

Code:
usb start
load usb 0:1 0x600000 /u-boot.2019.12.30.bin
go 0x600000

I can't believe I spent so much time on a $10 computer! But I was able to do the uboot upgrades that I wanted to do, even though I lost one Pogoplug.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
January 06, 2020 04:37AM
> In other news: Really odd things happen with
> trying to load a new uboot into memory vs.
> flashing it and then running it from the flash.
> Yeah, the DENX U-Boot people say that's not
> supported. But you'd really like to do u-boot
> development that way, to avoid the risk of
> bricking your device with a bad u-boot.
>
> With the bodhi 2017 uboot in the flash, stop the
> boot and load the newly-built uboot.bin into ram
> and then jump to it. About 90% of the time it
> works with the DENX
> ftp://ftp.denx.de/pub/u-boot/u-boot-2019.10.tar.bz2
> build. But only 1% of the time does this work on
> a build from bodhi's 2017 uboot. Older versions,
> like the 2010 & 2012 uboot work sometimes and fail
> sometimes.

That's really not odd at all. That more or less how it has been (since 2012) regarding chainloading uboot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
May 30, 2020 11:14AM
Hi Guys,

I got serial console.erased mtd0 and I had a hickup in power so my NSA320s is now bricked with mtd0 empty.

Have anyone tried to JTAG NSA320s? thank you in advance.

Best Regards
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
May 30, 2020 04:35PM
enki,

No need for JTAG:

https://forum.doozan.com/read.php?3,51739,51919#msg-51919

And you can use kwboot version that already installed in your serial console Linux host.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 05/30/2020 04:38PM by bodhi.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
May 30, 2020 05:27PM
enki,

I answered your post above.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 05/30/2020 05:27PM by bodhi.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
May 30, 2020 05:32PM
Hi Bodhi,

First thank you for prompt reply. I have tried the followings:

0. connect usb cable to serial console of the NSA320s; lsusb shows:
Bus 003 Device 010: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

1. turned on NSA320s by pressing button;

2. run 'kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa310s.mtd0.kwb -p' command from a Linux laptop.

Sending boot message. Please reboot the target...-^C

and wait but nothing happens ... I had to ^C to return to prompt.

Can I do any other checks ?
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
May 30, 2020 05:34PM
enki,

Quote

First thank you for prompt reply. I have tried the followings:

0. connect usb cable to serial console of the NSA320s; lsusb shows:
Bus 003 Device 010: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

1. turned on NSA320s by pressing button;

2. run 'kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2017.07-tld-1.nsa310s.mtd0.kwb -p' command from a Linux laptop.

Sending boot message. Please reboot the target...-^C

and wait but nothing happens ... I had to ^C to return to prompt.

Can I do any other checks ?

Let's move the conversation to:

https://forum.doozan.com/read.php?3,51739

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
November 26, 2020 05:30PM
hello,

I am tring to recover my pogo plug e02.
i bought it used on ebay, i never had it working. I almost got Dohi's debian rootfs to load, through tftpboot, but was stuck on loadin kernel.

I was impatient and tried frist thing i saw for flashing u-boot from openwrt forum. this made device corrupt nand enven further than it was.

I am left with jtag as my last hope ( Help me Old Ben One, you are our only hope)

I followed the first post and let openocd compile on my pi, but when I did a test run of the binary, without any connections I got some unexpected settings deprication errors. I wanted to ask if these are ok to continue or no.

pi@raspberrypi:~ $ sudo openocd -f pogo.cfg
Open On-Chip Debugger 0.10.0+dev-01514-ga8edbd020-dirty (2020-11-26-10:55)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
DEPRECATED! use 'adapter driver' not 'interface'
DEPRECATED! use 'adapter speed' not 'adapter_khz'
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Warn : use 'feroceon.cpu' as target identifier, not '0'
pogo_load_uboot
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 200 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: feroceon.cpu: IR capture error; saw 0x00 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
Info : starting gdb server for feroceon.cpu on 3333
Info : Listening on port 3333 for gdb connections
pogp_init
pogo_init
soft_reset_halt
nand probe 0
^Cshutdown command invoked

pi@raspberrypi:~ $ 

Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
November 26, 2020 10:59PM
Is the telnet interface needed, can it be a second ssh or term screen.
I'm having trouble setting up telnetd on my pi.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
November 26, 2020 11:53PM
You don't need telnetd. You telnet to port 4444 which is openocd's service port. You just need telnet client.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
November 27, 2020 06:32AM
Maybe I need an older version of raspian OS.
openOCD gives deprication errors. and fails to connect to JTAG.

pi@raspberrypi:~ $ telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> pogo_init
DEPRECATED! use 'adapter [de]assert' not 'jtag_reset'
unexpected Feroceon EICE version signature
DEPRECATED! use 'adapter [de]assert' not 'jtag_reset'
Halt timed out, wake up GDB.
timed out while waiting for target halted

> soft_reset_halt
requesting target halt and executing a soft reset
Failed to halt CPU after 1 sec
Halt timed out, wake up GDB.
> pogo_init      
DEPRECATED! use 'adapter [de]assert' not 'jtag_reset'
unexpected Feroceon EICE version signature
DEPRECATED! use 'adapter [de]assert' not 'jtag_reset'
Halt timed out, wake up GDB.
timed out while waiting for target halted

> soft_reset_halt
requesting target halt and executing a soft reset
Failed to halt CPU after 1 sec
Halt timed out, wake up GDB.
> nand probe 0
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
NAND flash access requires halted target
unknown NAND flash device found, manufacturer id: 0x00 device id: 0x00

> pogo_init
DEPRECATED! use 'adapter [de]assert' not 'jtag_reset'
unexpected Feroceon EICE version signature
DEPRECATED! use 'adapter [de]assert' not 'jtag_reset'
Halt timed out, wake up GDB.
timed out while waiting for target halted


I changed the pogo.cfg lines

 jtag_reset 0 1
  feroceon.cpu arp_examine
 halt 0
 jtag_reset 0 0

to
 # jtag_reset 0 1
 adapter assert srst
 feroceon.cpu arp_examine
 halt 0
 # jtag_reset 0 0
 adapter deassert srst


Still do not have the halt status, and nand probe fails to get device


Ive noticed from the example output from 'T1' my openOCD is not declaring gpio pins.
I am on rasbian buster. And suspect changes to the core of rasbian gpio may have been changed. I am going to try and start over with Jessie instead of buster, hope it helps



Edited 5 time(s). Last edit at 11/27/2020 06:52PM by mrmazak.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
November 27, 2020 09:56PM
I got the same errors with Jessie. and current build of openOCD.(v10)

I tried to build with the other branch (v6.0.1) on github, that didnt go so well. It gave error that the only interface programed in build was buspirate.

I got little further with the apt-get repository version (v8) but I had to comment out some config lines because errors said unknown command. But it did show connection to the nand , i think.

Setting up openocd (0.8.0-4+deb7u1) ...
pi@raspberrypi:~ $ sudo openocd -f pogo.cfgOpen On-Chip Debugger 0.8.0 (2018-01-22-05:24)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Runtime Error: /usr/share/openocd/scripts/interface/raspberrypi123-native.cfg:18: invalid command name "bcm2835gpio_peripheral_base"
in procedure 'script' 
at file "embedded:startup.tcl", line 58
at file "pogo.cfg", line 10
at file "/usr/share/openocd/scripts/interface/raspberrypi123-native.cfg", line 18
pi@raspberrypi:~ $ sudo nano /usr/share/openocd/scripts/board/pogo.cfgpi@raspberrypi:~ $ sudo nano /usr/share/openocd/scripts/board/pogo.cfg
pi@raspberrypi:~ $ sudo nano /usr/share/openocd/scripts/interface/raspberrypi123-native.cfg
pi@raspberrypi:~ $ sudo openocd -f pogo.cfgOpen On-Chip Debugger 0.8.0 (2018-01-22-05:24)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
BCM2835 GPIO config: tck = 11, tms = 25, tdi = 10, tdi = 9
Runtime Error: /usr/share/openocd/scripts/interface/raspberrypi123-native.cfg:45: invalid command name "bcm2835gpio_swd_nums"
in procedure 'script' 
at file "embedded:startup.tcl", line 58
at file "pogo.cfg", line 10
at file "/usr/share/openocd/scripts/interface/raspberrypi123-native.cfg", line 45
pi@raspberrypi:~ $ sudo nano /usr/share/openocd/scripts/interface/raspberrypi123-native.cfg
pi@raspberrypi:~ $ sudo openocd -f pogo.cfgOpen On-Chip Debugger 0.8.0 (2018-01-22-05:24)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
BCM2835 GPIO config: tck = 11, tms = 25, tdi = 10, tdi = 9
BCM2835 GPIO config: trst = 7
trst_only separate trst_push_pull
adapter speed: 200 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
Warn : use 'feroceon.cpu' as target identifier, not '0'
pogo_load_uboot
Info : clock speed 200 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
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 15
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Error: unexpected Feroceon EICE version signature
Warn : ThumbEE -- incomplete support
Info : accepting 'telnet' connection from 4444
Error: unexpected Feroceon EICE version signature
requesting target halt and executing a soft reset
Error: Jazelle state handling is BROKEN!
target state: halted
target halted in Jazelle state due to debug-request, current mode: Supervisor
cpsr: 0xffffffd3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
Error: unknown NAND flash device found, manufacturer id: 0xff device id: 0xff
in procedure 'nand'
Error: unexpected Feroceon EICE version signature
Error: unknown NAND flash device found, manufacturer id: 0xff device id: 0xff
in procedure 'nand'
requesting target halt and executing a soft reset
Error: Jazelle state handling is BROKEN!
target state: halted
target halted in Jazelle state due to debug-request, current mode: Supervisor
cpsr: 0xffffffd3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled

Now I guess I can try repository build on my original Buster os PI. But It would be great I someone has a verified repo of correct working build repo of openOCD that this guide used.

I did find snapshots packages on sourceforge for openOCD, and built with a bundle from 2018, in did build a version 9.0, but also did not connect.

I did also build from an updated got link, and got v10 again, and was able to (occasionally) get a halt in 'jazzel' mode, which results in a 'jazzel handling broken' message.

Didn't see this mode in my quick search.
This cheap pc board sure is got me spending too much time working on it.



Edited 1 time(s). Last edit at 11/28/2020 02:02PM by mrmazak.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
December 07, 2020 03:43PM
Hi mrmazak
i did this repair job in the middle of 2015, but it should work also with new raspbian an aktual openocd. The only thing i didnt try is with newer Pis.
The last one was:(B,B+700Mhz, RPI2 900Mhz and RPI3 1200Mhz) with simply standard clock Speed of the Raspis.
You shouldnt change anything in discription and workflow - folllow simply straight forward the instructions on page 1 (inkluding my GPIOs and the right cabel setting to your Pogo) and you will succeed like all the other people in this thread.

But be warned : jtag should be the last option and cause always some riscs.



Edited 2 time(s). Last edit at 12/07/2020 04:03PM by joerg_999.
Re: HOW2: Repair Pogo E02 with Raspberry PI (1,2 or 3) JTAG and OpenOCD
December 09, 2020 06:14PM
joerg_999 Wrote:
-------------------------------------------------------
> Hi mrmazak
> i did this repair job in the middle of 2015, but
> it should work also with new raspbian an aktual
> openocd. The only thing i didnt try is with newer
> Pis.
> The last one was:(B,B+700Mhz, RPI2 900Mhz and RPI3
> 1200Mhz) with simply standard clock Speed of the
> Raspis.
> You shouldnt change anything in discription and
> workflow - folllow simply straight forward the
> instructions on page 1 (inkluding my GPIOs and the
> right cabel setting to your Pogo) and you will
> succeed like all the other people in this thread.
>
> But be warned : jtag should be the last
> option and cause always some riscs.

Thank you sir.

I did not get device to work. One time during experimenting with openOCD config settings. Seemed to show am actual connection to device, but failed to write to mtd#.
I purchased the device used, and it was broken' when received, so no real loss. The seller refunded purchase because they sold it as 'working' bit was not and they admitted it was broke to begin with.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: