November 22, 2024, 09:21:46 PM

tiny 10us glitch on nTRST at startup

Started by pds, August 06, 2022, 07:15:02 AM

Previous topic - Next topic

pds

There is a small ~10uS positive-going glitch on the nTRST signal, due to the way that the MPSSE mode of ftdi chips is configured in the file ./openocd/share/openocd/scripts/interface/ftdi/olimex-...

The line
ftdi_layout_init 0x0808 0x0a1bshould rather be
ftdi_layout_init 0x0b08 0x0b1b
Bits 8 and 9 of the first 16-bit word of ftdi_layout_init should be '1', so that the internal pull-ups for nTRST and nSRST are enabled.

Bit 8 of the second 16-bit word of ftdi_layout_init should be '1', so that nTRST is initially configured in an output direction.

This is somewhat related to the discussions in Olimex ARM-USB-OCD SRST pull-down resistance and Can the ARM-USB-TINY-H put the SRST pin into a high impedance state?

The following table might be helpful:

Sig  MPSSE   PIN    P/U DIR
TCK  TCK/SK  ADBUS0  0   1
TDI  TDI/DO  ADBUS1  0   1
TDO  TDO/DI  ADBUS2  0   0
TMS  TMS/CS  ADBUS3  1   1
???  GPIOL0  ADBUS4  0   1
.    GPIOL1  ADBUS5  0   0
.    GPIOL2  ADBUS6  0   0
.    GPIOL3  ADBUS7  0   0
TRST GPIOH0  ACBUS0  1   1
SRST GPIOH1  ACBUS1  1   1
.    GPIOH2  ACBUS2  0   0
LED  GPIOH3  ACBUS3  1   1
.    GPIOH4  ACBUS4  0   0
.    GPIOH5  ACBUS5  0   0
.    GPIOH6  ACBUS6  0   0
.    GPIOH7  ACBUS7  0   0

LubOlimex

#1
Thank you for this contribution. Please also notify the OpenOCD community about your findings if you haven't already. Also please specify which unit exactly it applies too.

In our OpenOCD debuggers the SRST has big pull-down resistor. Value depends on exact unit: in ARM-USB-OCD-H it is 470k, in ARM-USB-TINY-H it is 1M, in ARM-USB-OCD it is 270k, in ARM-UBS-TINY it is again 270k. It might be good to have some pull-up on the SRST at your target (10k would be good value for the pull-up at the target, but no more than 50k). And yes, as you noted it can be toggled via software means it is connected via transistor to FT2232's ACBUS1, but maybe the software configuration is not proper.
Technical support and documentation manager at Olimex