riscv-openocd/contrib/firmware/angie/c
Ahmed BOUDJELIDA 0c2d907a5d contrib/firmware: Change USB interruption handling for JTAG/I2C communications
Before this change, when we send an I2C Bulk data at the same
time while Jtag bitbanging functions execute, the microcontroller
puts JTAG bitbanging on wait and executes all I2C bitbanging
function, which causes problems like loss of Ack in DAP responses
and other errors.

With this commit, When I2C interruption occurs, it sets a variable
to true and continues JTAG bitbanging, when it finish it executes
the I2C bitbang.

Change-Id: Ia80bac21f8a259f4a1176b5346bf74ed0aa6e38b
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8074
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2024-01-29 13:36:27 +03:00
..
include contrib/firmware: Change USB interruption handling for JTAG/I2C communications 2024-01-29 13:36:27 +03:00
src contrib/firmware: Change USB interruption handling for JTAG/I2C communications 2024-01-29 13:36:27 +03:00
Makefile jtag/drivers: give ANGIE a new PID after renumeration 2024-01-29 13:36:27 +03:00
README contrib/firmware: add new i2c bit-banging feature to angie's firmware 2023-08-26 11:45:43 +00:00

README

#SPDX-License-Identifier: GPL-2.0-or-later

This is the ANGIE firmware for ANGIE USB-JTAG adapter.

The main components of ANGIE adapter are:
- Cypress EZ-USB FX2 microcontroller
- Spartan-6 FPGA
- SRAM memory chip
- Pin headers for various JTAG pin assignments

To compile the firmware, the SDCC compiler package is required. Most Linux
distributions include SDCC in their official package repositories. The SDCC
source code can be found at http://sdcc.sourceforge.net/

Simply type "make bin" in the ANGIE directory to compile the firmware.
"make clean" will remove all generated files except the BIN file
required for downloading the firmware to ANGIE.

Note that the EZ-USB FX2 microcontroller does not have on-chip flash,
ANGIE include on-board EEPROM memory to store the firmware program of
the FX2, but we are not going to use this method.

Instead, upon initial connection of the ANGIE adapter to the host PC
via USB, the EZ-USB FX2 core has enough intelligence to act as a
stand-alone USB device, responding to USB control requests and allowing
firmware download via a special VENDOR-type control request. Then, the
EZ-USB microcontroller simulates a disconnect and re-connect to the USB bus.
It may take up to two seconds for the host to recognize the newly connected
device before OpenOCD can proceed to execute JTAG commands. This delay is
only visible when OpenOCD first uses a blank (unconfigured) ANGIE device.

Once the firmware downloaded, the FX2 microcontroller activate its GPIF mode,
download the Spartan-6 FPGA's bitstream, program the FPGA rapidly, and switch
back to default io mode.

Once the user disconnects the ANGIE adapter, all its memory contents are lost
and the firmware & bitstream download process has to be executed again.