JTAG beagle bone black with buspirate and openocd

OpenOCD JTAG debugging with the Bus Pirate.

JTAG beagle bone black with buspirate and openocd

Postby jitendriya » Thu Aug 03, 2017 5:18 am

Hello

I am very new to JTAG and i am trying to do the setup for jtag in beaglebone black(BBB) rev c board using buspirate(BP) and openocd.
I have installed the P2 header in BBB manually. I have connected the BBB and BP as follows
JTAG BP BBB
TMS CS P2(1) P2 header pin 1
TDI MOSI P2(3)
VTREF VPU P2(5)
TDO MISO P2(7)
TCK CLK P2(11)
TRST AUX P2(2)
GRND GND P2(10)


I am using my user configuration file(BP_userconfig.cfg) for openocd which has following content.

source [find interface/buspirate.cfg]
source [find board/ti_beaglebone_black.cfg]
buspirate_vreg 0
buspirate_mode open-drain
buspirate_pullup 1
reset_config trst_only
buspirate_port /dev/ttyUSB0



Now while running the command sudo openocd -f BP_userconfig.cfg I am getting following error.

lenova@lenova-ThinkPad-T410:~/jiten/JTAG$ sudo openocd -f BP_userconfig.cfg
Open On-Chip Debugger 0.10.0+dev-00167-g29cfe9c (2017-07-20-14:08)
Licensed under GNU GPL v2

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 connect_deassert_srst
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter speed: 1000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
Info : Buspirate Interface ready!
Info : This adapter doesn't support configurable speed
Info : JTAG tap: am335x.jrc tap/device found: 0x2b94402f (mfg: 0x017 (Texas Instruments), part: 0xb944, ver: 0x2)
Info : JTAG tap: am335x.dap enabled
Error: JTAG-DP STICKY ERROR
Error: Could not initialize the APB-AP

Does anyone have any idea about this error? and do i need to do anything else in BBB apart from installing P2 header?
Please let me know if i am doing anything wrong.

Thanks in advance.

Regards
jitendriya
jitendriya
Newbie
Newbie
 
Posts: 1
Joined: Thu Aug 03, 2017 2:47 am

Re: JTAG beagle bone black with buspirate and openocd

Postby USBEprom » Sun Sep 02, 2018 5:27 am

Hi jitendriya.
One thought, even if actually I know very little about OpenOCD and JTAG.
In the connections you wrote there is TRST <-> AUX, but actually by reading the documentation (http://dangerousprototypes.com/docs/Bus ... or_OpenOCD) with Bus Pirate TRS is not available (TRST = N/A), rather there is SRST <-> AUX, so are you really sure you can arrange the connections like you wrote them?
As also stated here:

https://research.kudelskisecurity.com/2 ... d-openocd/

Test Reset (TRST) pin is optional.

However by looking at the OpenOCD documentation (http://openocd.org/doc/html/Reset-Configuration.html):

* Drive type ... Reset lines often have a pullup resistor, letting the JTAG interface treat them as open-drain signals. But that’s not a requirement, so the adapter may need to use push/pull output drivers. Also, with weak pullups it may be advisable to drive signals to both levels (push/pull) to minimize rise times. Use the reset_config trst_type and srst_type parameters to say how to drive reset signals.

* Special initialization ... Targets sometimes need special JTAG initialization sequences to handle chip-specific issues (not limited to errata). For example, certain JTAG commands might need to be issued while the system as a whole is in a reset state (SRST active) but the JTAG scan chain is usable (TRST inactive). Many systems treat combined assertion of SRST and TRST as a trigger for a harder reset than SRST alone. Such custom reset handling is discussed later in this chapter.

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 157
Joined: Wed Mar 14, 2012 4:09 pm


Return to OpenOCD JTAG