"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
  Develop a new firmware for PineTime belushi 2 1,282 09-25-2023, 12:32 PM
Last Post: ccchan234
  Bluetooth BLE-MIDI-controller app for PineTime / InfiniTime Luno 0 498 08-20-2023, 05:17 AM
Last Post: Luno
  Zephyr Backlight Examples for PineTime lcj 0 691 05-06-2023, 02:54 PM
Last Post: lcj
  Zephyr is ready for pinetime jandy 1 2,074 05-06-2023, 02:15 PM
Last Post: lcj
  Send a message from Android to pinetime via BLE razrosman 0 905 11-05-2022, 08:24 AM
Last Post: razrosman
  PineTime Stuck in DFU Mode Eesha Barua 1 2,000 07-25-2022, 09:17 PM
Last Post: heyhewmike
  Idle tracking with PineTime: how versatile it is? schaman 1 1,610 07-13-2022, 12:50 AM
Last Post: wibble
  PineTime implemented with partial of pebble API jandy 0 1,535 03-20-2022, 08:58 PM
Last Post: jandy
  Zephyr based Pinetime jandy 4 4,631 11-11-2021, 05:53 AM
Last Post: jandy
  Problems with pinetime watch face simulator Elements 0 1,901 08-18-2021, 03:05 PM
Last Post: Elements

Forum Jump:


Users browsing this thread: 1 Guest(s)