This is an automated email from Gerrit. Anonymous Coward ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/5334
-- gerrit commit 1e12fae2e6035dbdea472f9d1bf4ac1bb6ea81f8 Author: Alexandru Gagniuc <[email protected]> Date: Sun Oct 27 11:35:32 2019 -0500 jtag: Define interface for command to toggle JTAG pins manually On some targets, a specific sequence of waveforms needs to be sent for the JTAG pins to be enabled. Waveforms which do not involve the manipulation of the JTAG state machine may not be achievable reliably with pathmove() statemove() or reset APIs. For such cases, controlling the JTAG pins individually may be required on power-on or before a scan. I've chosen to use two bitmasks: a mask containing the pin values, and a mask containing the pins to write. I've also considered an array of pin numbers, but settled on the masks because they make the jtag commands easier to write. For example, on AVR32 UC3 targets, TCK must be held low while SRST is de-asserted. Such a sequence cannot be created with the existing JTAG command API. Change-Id: Ic27c397568a514767cac6182d2e69a64060887ad Signed-off-by: Alexandru Gagniuc <[email protected]> diff --git a/src/jtag/commands.h b/src/jtag/commands.h index c037596..399db93 100644 --- a/src/jtag/commands.h +++ b/src/jtag/commands.h @@ -116,6 +116,25 @@ struct tms_command { const uint8_t *bits; }; +/* + * Allows JTAG pins to be individually manipulated. This is useful for devices + * where a certain sequence must be applied to enable JTAG, and that sequence + * cannot be achieved with other JTAG commands. + */ +enum jtag_pins { + JTAG_PIN_TCK = (1 << 0), + JTAG_PIN_TMS = (1 << 1), + JTAG_PIN_TDI = (1 << 2), + JTAG_PIN_TDO = (1 << 3), + JTAG_PIN_TRST = (1 << 5), + JTAG_PIN_SRST = (1 << 7), +}; + +struct pins_command { + uint8_t pin_state; + uint8_t pin_mask; +}; + /** * Defines a container type that hold a pointer to a JTAG command * structure of any defined type. @@ -130,6 +149,7 @@ union jtag_command_container { struct end_state_command *end_state; struct sleep_command *sleep; struct tms_command *tms; + struct pins_command *pins; }; /** @@ -152,6 +172,7 @@ enum jtag_command_type { JTAG_SLEEP = 7, JTAG_STABLECLOCKS = 8, JTAG_TMS = 9, + JTAG_PINS = 10, }; struct jtag_command { -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
