It does not mention anything in the datasheet, it is not a strapping pin.
I am building a device with 3 CAN busses. I know that the ESP32-C6 only has two TWAI controllers, so im using the IOMUX to allow software to select any 2 of the 3 CAN busses for use.
I have the following setup in my design:
CAN-1 Rx - GPIO4
CAN-1 Tx - GPIO5
CAN-2 Rx - GPIO6
CAN-2 Tx - GPIO22
CAN-3 Rx - GPIO1
CAN-3 Tx - GPIO0
CAN 1, CAN 2 seem to work fine. CAN 3 seems to work for Rx/receive only.
In the ESP-LOG window, it prints a message upon boot saying "esp_twai: GPIO 0 is not usable, maybe used by others"
Line 151 in esp_twai_onchip.c:
Code: Select all
node->gpio_reserved = reserve_mask;
uint64_t busy_mask = esp_gpio_reserve(reserve_mask);
uint64_t conflict_mask = busy_mask & reserve_mask;
for (; conflict_mask > 0;) {
uint8_t pos = __builtin_ctzll(conflict_mask);
conflict_mask &= ~(1ULL << pos);
ESP_LOGW(TAG, "GPIO %d is not usable, maybe used by others", pos);
}
return ESP_OK;Luckily I only had a handful of prototype boards made, this could have been catastrophic if I had done a full production run without knowing this hidden TWAI limitation...
