"Pine64 USB JTAG Adapter + OpenOCD + PineTime" should it work?
#1
as a beginner, a looked at "PineTime Devkit Wiring" tutorial, 
and decided to order the Pine64 USB JTAG Adapter (schematic) alongside with PineTime dev kit to play with it...

but then i realized, that it's not a ST-Link clone...
also, i had to play additionally with drivers using "Zadig" app on Windows.

i'm trying to make it work with OpenOCD, and so far no luck with
Code:
.\openocd.exe -f interface/ftdi/ft232h-module-swd.cfg -f target/nrf52.cfg

Quote:Open On-Chip Debugger 0.11.0 (2021-03-07-12:52)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
swd
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : clock speed 1000 kHz
Error: Error connecting DP: cannot read IDR



long story short, has anyone tried this?
is it supposed to work at all?
Away
  Reply
#2
the same on Linux (ubuntu kind. on real hardware).
no luck...

any suggestions?
Away
  Reply
#3
I'm guessing nobody here has tried it. I've only used the Raspberry Pi option since I already had one. Have you compared the schematic to that of the adafruit board the openocd config you're using was written for? What connections did you use?
  Reply
#4
(03-01-2022, 12:34 PM)wibble Wrote: I'm guessing nobody here has tried it. I've only used the Raspberry Pi option since I already had one. Have you compared the schematic to that of the adafruit board the openocd config you're using was written for? What connections did you use?

i tried to connect like this using Pogo Pins connections (also tried wires included in PineTime box)

Code:
Pine64 USB       -> PineTime
(8) TDI/SWDIO    -> (1) SWDIO
(4) TCK/SWDCLK   -> (2) SWDCLK
not connected    -> (3) -
(9)  Ground      -> (4) GND


since Pine64 USB can outputs only 5v i ended up with not connecting the power, taking into account that PineTime is powered by battery. but i also tried with connecting power from pin#1, it leads to PineTime reboot, but nothing more - the OpenOCD outputs the same error.

unfortunately, i'm a newbie with OpenOCD, and not sure how to change configs according to the board or adapter schematic.
in the ft232h-module-swd.cfg there is a comment "ADAFRUIT FTDI FT232H as a SWD direct connect interface. Any FT232H based board may work.", so i was hoping it should just work. but it's not.
Away
  Reply
#5
I'm going on a little reading and informed guesswork, so treat what I'm about to say accordingly.

I would investigate the 5V issue first - if the adapter sends 5V to a device that can't tolerate it you will cause permanent damage. That's how people end up with dead GPIO pins on their Pi, or even a dead Pi. The adapter schematic doesn't show a 3.3V regulator, and I don't know if the FT232H has an internal one and a level config option. If it doesn't then you'll need to look for a bidirectional level converter to move the signals between 5V and 3.3V.

https://www.allaboutcircuits.com/technic...debugging/
https://plaes.org/technotes/embedded-sys...e-hacking/

Based on the above it looks like you need both TDI and TDO (via a resistor) connected to SWDIO. The first one has some detail on what each bit of the config actually means too.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PineTime Stuck in DFU Mode Eesha Barua 0 81 06-02-2022, 09:44 AM
Last Post: Eesha Barua
  PineTime implemented with partial of pebble API jandy 0 333 03-20-2022, 08:58 PM
Last Post: jandy
  Zephyr is ready for pinetime jandy 0 408 02-28-2022, 09:37 PM
Last Post: jandy
  Zephyr based Pinetime jandy 4 1,656 11-11-2021, 05:53 AM
Last Post: jandy
  Problems with pinetime watch face simulator Elements 0 847 08-18-2021, 03:05 PM
Last Post: Elements
  PineTime display and micropython danielt 17 13,939 05-07-2021, 12:15 PM
Last Post: danielt
Heart wasp-os: MicroPython for PineTime! danielt 104 103,940 05-04-2021, 02:43 PM
Last Post: Msaulnier1
  Using Pine64 to install Wasp-os on PineTime Mpoint 1 1,767 04-30-2021, 02:39 AM
Last Post: danielt
  Star Trek computer themed wasp-os on PineTime graynada 13 13,541 12-14-2020, 07:10 PM
Last Post: tllim
  Update bootlogo and pinetime-app with OTA/DFU lookin 3 2,747 11-25-2020, 04:51 PM
Last Post: lookin

Forum Jump:


Users browsing this thread: 1 Guest(s)