nopnop2002 / esp-idf-can2mqtt

CANbus to mqtt bridge using esp32
MIT License
39 stars 8 forks source link

Modifications needed for ESP32-EVB #8

Open lbartik opened 1 week ago

lbartik commented 1 week ago

ESP32-EVB CAN RX is on GPIO 35. Menuconfig will not let you use pin 35 unless you increase GPIO_RANGE_MAX to 35 in main\Kconfig.projbuild like so:

config GPIO_RANGE_MAX int default 35 if IDF_TARGET_ESP32

nopnop2002 commented 1 week ago

Thank you for your report.

ESP32-EVB CAN RX is on GPIO 35

The GPIO used for CAN is not fixed.

You can use any pin you like.

As you know, GPIO 34 and later on ESP32 are input-only pins.

Only RX can be used.


config GPIO_RANGE_MAX int default 35 if IDF_TARGET_ESP32

This is for backward compatibility with ESP-IDFV4.4.

The lifecycle of ESP-IDF V4.4 will end next month.

Once the lifecycle of ESP-IDF V4.4 ends, we plan to replace it with the following:

orsource "$IDF_PATH/examples/common_components/env_caps/$IDF_TARGET/Kconfig.env_caps"

This includes GPIO maximum, input pin maximum, and output pin maximum for each target.

This solves the problem of input-only pins on ESP32.