Pin map¶
Every functional pin and ADC channel of Vortex V1. The tables below are generated from the board's pin header,
hf_functional_pin_config_vortex_v1.hpp,
whose X-macro tables are the single source of pin truth (ADR 0003). CI fails
when the header changes and these tables are not regenerated, so they cannot drift.
How to read them:
- Function is the
HfFunctionalGpioPin(orHfFunctionalAdcChannel) enum value. Code uses it, or the Name string, to find a pin:vortex.gpio.Get(HfFunctionalGpioPin::PCAL_TMC_DRV_EN)orvortex.gpio.Get("GPIO_PCAL_TMC_DRV_EN"). - Category: Core pins are reserved for the system (boot, crystal, USB), Comm pins belong to a bus and are
configured by its owner, Gpio pins are registered by
GpioManager. - Active is the asserted level. For an active-low pin,
SetActive()drives it low.
Summary¶
From
hf_functional_pin_config_vortex_v1.hpp;
do not edit.
| Pin source | Functional pins | Of which: core | comm | GPIO |
|---|---|---|---|---|
| ESP32-C6 GPIO | 20 | 5 | 13 | 2 |
| PCAL95555 I/O expander | 12 | 0 | 0 | 12 |
| TMC9660 GPIO | 2 | 0 | 0 | 2 |
| ADC channels | 15 |
ESP32-C6 GPIO¶
From
hf_functional_pin_config_vortex_v1.hpp;
do not edit.
| Function | Pin | Category | Name (for GpioManager) |
Active | Pull | Max mA |
|---|---|---|---|---|---|---|
XTAL_32K_P |
GPIO0 | Core | CORE_XTAL_32K_P |
high | none | - |
XTAL_32K_N |
GPIO1 | Core | CORE_XTAL_32K_N |
high | none | - |
SPI2_MISO |
GPIO2 | Comm | COMM_SPI2_MISO |
high | up | 40 |
WS2812_LED_DAT |
GPIO3 | Comm | COMM_WS2812_LED_DAT |
high | none | 40 |
UART_RXD |
GPIO4 | Comm | COMM_UART_RXD |
high | up | 40 |
UART_TXD |
GPIO5 | Comm | COMM_UART_TXD |
high | none | 40 |
SPI2_SCK |
GPIO6 | Comm | COMM_SPI2_SCK |
high | none | 40 |
SPI2_MOSI |
GPIO7 | Comm | COMM_SPI2_MOSI |
high | none | 40 |
EXT_GPIO_CS_2 |
GPIO8 | Gpio | GPIO_EXT_GPIO_CS_2 |
low | up | 40 |
BOOT_SEL |
GPIO9 | Core | CORE_BOOT_SEL |
high | none | - |
JTAG_USB_D_N |
GPIO12 | Core | CORE_JTAG_USB_D_N |
high | none | - |
JTAG_USB_D_P |
GPIO13 | Core | CORE_JTAG_USB_D_P |
high | none | - |
TWAI_TX |
GPIO14 | Comm | COMM_TWAI_TX |
high | up | 40 |
TWAI_RX |
GPIO15 | Comm | COMM_TWAI_RX |
high | up | 40 |
SPI2_CS_TMC9660 |
GPIO18 | Comm | COMM_SPI2_CS_TMC9660 |
low | up | 40 |
EXT_GPIO_CS_1 |
GPIO19 | Gpio | GPIO_EXT_GPIO_CS_1 |
low | up | 40 |
SPI2_CS_AS5047 |
GPIO20 | Comm | COMM_SPI2_CS_AS5047 |
low | up | 40 |
I2C_SDA |
GPIO21 | Comm | COMM_I2C_SDA |
high | up | 40 |
I2C_SCL |
GPIO22 | Comm | COMM_I2C_SCL |
high | up | 40 |
I2C_PCAL95555_INT |
GPIO23 | Comm | COMM_I2C_PCAL95555_INT |
low | up | 40 |
PCAL95555 I/O expander¶
The expander sits at I2C address 0x20. The pin column shows the expander port pin (P0_0 to P1_7) and the bit
number (0 to 15) the driver uses.
From
hf_functional_pin_config_vortex_v1.hpp;
do not edit.
| Function | Pin | Category | Name (for GpioManager) |
Active | Pull | Max mA |
|---|---|---|---|---|---|---|
PCAL_TMC_GPIO17_EXP_IN |
P0_1 (bit 1) | Gpio | GPIO_PCAL_TMC_GPIO17_EXP_IN |
high | none | 25 |
PCAL_TMC_GPIO18_EXP_IN |
P0_2 (bit 2) | Gpio | GPIO_PCAL_TMC_GPIO18_EXP_IN |
high | none | 25 |
PCAL_TMC_FAULT_STATUS |
P0_3 (bit 3) | Gpio | GPIO_PCAL_TMC_FAULT_STATUS |
low | none | 25 |
PCAL_TMC_DRV_EN |
P0_4 (bit 4) | Gpio | GPIO_PCAL_TMC_DRV_EN |
high | none | 25 |
PCAL_TMC_RST_CTRL |
P0_5 (bit 5) | Gpio | GPIO_PCAL_TMC_RST_CTRL |
high | none | 25 |
PCAL_PWR_GOOD |
P0_6 (bit 6) | Gpio | GPIO_PCAL_PWR_GOOD |
high | none | 25 |
PCAL_CAN_HS_STB_OP |
P1_2 (bit 10) | Gpio | GPIO_PCAL_CAN_HS_STB_OP |
high | none | 25 |
PCAL_IMU_BOOT |
P1_3 (bit 11) | Gpio | GPIO_PCAL_IMU_BOOT |
low | none | 25 |
PCAL_IMU_INT |
P1_4 (bit 12) | Gpio | GPIO_PCAL_IMU_INT |
low | none | 25 |
PCAL_TMC_SPI_COMM_EN |
P1_5 (bit 13) | Gpio | GPIO_PCAL_TMC_SPI_COMM_EN |
low | none | 25 |
PCAL_TMC_WAKE_CTRL |
P1_6 (bit 14) | Gpio | GPIO_PCAL_TMC_WAKE_CTRL |
low | none | 25 |
PCAL_IMU_RST |
P1_7 (bit 15) | Gpio | GPIO_PCAL_IMU_RST |
low | none | 25 |
TMC9660 GPIO¶
Reached through the TMC9660 handler once MotorController has created the onboard device.
From
hf_functional_pin_config_vortex_v1.hpp;
do not edit.
| Function | Pin | Category | Name (for GpioManager) |
Active | Pull | Max mA |
|---|---|---|---|---|---|---|
TMC_GPIO17 |
GPIO17 | Gpio | GPIO_TMC_GPIO17 |
high | none | 25 |
TMC_GPIO18 |
GPIO18 | Gpio | GPIO_TMC_GPIO18 |
high | none | 25 |
ADC channels¶
All active ADC channels are hosted by the TMC9660; the ESP32-C6's own ADC is not used. Channels 10 and above are the TMC9660's internal measurements (currents, supply voltages, temperatures, motor data).
From
hf_functional_pin_config_vortex_v1.hpp;
do not edit.
| Channel | Name (for AdcManager) |
Source | Ch | Bits | Full scale | Description |
|---|---|---|---|---|---|---|
TMC9660_AIN0 |
ADC_TMC9660_AIN0 |
TMC9660 | 0 | 16 | 3300 mV | TMC9660 ADC Input 0 (Reserved) |
TMC9660_AIN1 |
ADC_TMC9660_AIN1 |
TMC9660 | 1 | 16 | 3300 mV | TMC9660 ADC Input 1 (Reserved) |
TMC9660_AIN2 |
ADC_TMC9660_AIN2 |
TMC9660 | 2 | 16 | 3300 mV | TMC9660 ADC Input 2 (Reserved) |
TMC9660_AIN3 |
ADC_TMC9660_AIN3 |
TMC9660 | 3 | 16 | 3300 mV | TMC9660 ADC Input 3 (Temperature Sensor) |
TMC9660_CURRENT_I0 |
TMC9660_CURRENT_I0 |
TMC9660 | 10 | 16 | 3300 mV | TMC9660 Current Sense I0 |
TMC9660_CURRENT_I1 |
TMC9660_CURRENT_I1 |
TMC9660 | 11 | 16 | 3300 mV | TMC9660 Current Sense I1 |
TMC9660_CURRENT_I2 |
TMC9660_CURRENT_I2 |
TMC9660 | 12 | 16 | 3300 mV | TMC9660 Current Sense I2 |
TMC9660_CURRENT_I3 |
TMC9660_CURRENT_I3 |
TMC9660 | 13 | 16 | 3300 mV | TMC9660 Current Sense I3 |
TMC9660_SUPPLY_VOLTAGE |
TMC9660_SUPPLY_VOLTAGE |
TMC9660 | 20 | 16 | 3300 mV | TMC9660 Supply Voltage |
TMC9660_DRIVER_VOLTAGE |
TMC9660_DRIVER_VOLTAGE |
TMC9660 | 21 | 16 | 3300 mV | TMC9660 Driver Voltage |
TMC9660_CHIP_TEMPERATURE |
TMC9660_CHIP_TEMPERATURE |
TMC9660 | 30 | 16 | 3300 mV | TMC9660 Chip Temperature |
TMC9660_EXTERNAL_TEMPERATURE |
TMC9660_EXTERNAL_TEMPERATURE |
TMC9660 | 31 | 16 | 3300 mV | TMC9660 External Temperature |
TMC9660_MOTOR_CURRENT |
TMC9660_MOTOR_CURRENT |
TMC9660 | 40 | 16 | 3300 mV | TMC9660 Motor Current |
TMC9660_MOTOR_VELOCITY |
TMC9660_MOTOR_VELOCITY |
TMC9660 | 41 | 16 | 3300 mV | TMC9660 Motor Velocity |
TMC9660_MOTOR_POSITION |
TMC9660_MOTOR_POSITION |
TMC9660 | 42 | 16 | 3300 mV | TMC9660 Motor Position |
Changing a pin¶
- Edit the X-macro row in the pin header (in the hf-pincfg repository) and
advance the
lib/coresubmodule. - Run
hardfoc-docs genandhardfoc-docs figures, and commit the regenerated pages and figures with the submodule bump.