Gregory Ling
01/23/2024, 5:43 PMMatt Venn
01/23/2024, 6:36 PMTim Edwards
01/23/2024, 10:46 PMcaravel_hkflash.py
file, which toggles the LED on ACBUS2 (and/or ACBUS3?). There are several not-well-documented procedures in pyftdi; in the code, gpio = spi.get_gpio()
provides access to the low-level bit control over the FTDI chip ACBUS, and gpio.set_direction()
, gpio.configure()
, and gpio.write()
control those bits. There is also in the python code a class Led
which has a definition that looks to me like it would interfere with any attempt to control ACBUS pins other than the one driving the LED.Tim Edwards
01/23/2024, 10:49 PMACBUS0
pin is the one that drives the enables on the switches of devices U2 and U3 which connect the FTDI to the UART pins on Caravel).
It is also possible that only the header shunt has ever been used to drive the enable and that nobody has ever written a proper software solution for it.Gregory Ling
01/23/2024, 11:06 PMgling
01/24/2024, 12:09 AMTim Edwards
01/24/2024, 2:01 PMgling
01/24/2024, 2:01 PMTim Edwards
01/24/2024, 2:02 PMgling
01/24/2024, 2:02 PMgling
01/24/2024, 2:03 PMgling
01/24/2024, 2:04 PMgling
01/24/2024, 2:07 PMTim Edwards
01/24/2024, 2:15 PMgling
01/24/2024, 8:40 PMTim Edwards
01/24/2024, 11:23 PMgling
01/24/2024, 11:25 PMgling
01/25/2024, 5:30 PMTim Edwards
01/25/2024, 6:14 PMgpio.set_direction()
, gpio.write()
, and the routines defined in the Led
class. led.toggle()
does a gpio.write()
when it really should be attempting to leave the state unchanged except for the one bit used for the LED.gling
01/25/2024, 9:06 PMTim Edwards
01/25/2024, 9:07 PMTim Edwards
01/25/2024, 9:08 PMgling
01/25/2024, 9:08 PMgling
01/25/2024, 9:08 PMgling
01/25/2024, 9:09 PMTim Edwards
01/25/2024, 9:09 PMgling
01/25/2024, 9:09 PMgling
01/25/2024, 9:39 PMTim Edwards
01/26/2024, 12:54 AMfor reg in [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12]:
to:
for reg in range(0, 0x70):
There are some unused registers in that range but it covers all of them. I think most people are unaware that all the GPIOs can be configured and driven high/low directly through the SPI interface, and the full set isn't in the repository documentation. The mapping is defined in the caravel repository verilog/rtl/housekeeping.v
lines 344 to 483.Tim Edwards
01/26/2024, 12:57 AMgling
01/29/2024, 6:57 PMTim Edwards
01/29/2024, 7:52 PM