According to Guition documentation the GPIO pins exposed on the above board include GPIO01 to GPIO05 as IO. But I can only use GPIO01 as Output. The other pins do not respond to gpio_set_level() statements. I found a PDF detailing the specs of the P4 revision v1.3 chipset; Table 2-1 shows the pins as IO. But Table 2-3 has a qualification that GPIO pins 2 - 5 have IO MUX functions. I presume this is the reason why they are not behaving as expected.
I have no idea what IO MUX is or how to declare the pins as Output.
I would appreciate it if someone could enlighten me because without those pins I am one pin short of what I need for my project.
JC-ESP32P4-M3-DEV GPIO Pins problem
Re: JC-ESP32P4-M3-DEV GPIO Pins problem
To use GPIO pins 2-5 on the JC-esp32-p4 board you need to configure the pins as follows:
Everything works OK then.
Code: Select all
// Define the GPIO pins to be used (2, 3, 4, 5)
#define OUTPUT_PIN_MASK ((1ULL << 2) | (1ULL << 3) | (1ULL << 4) | (1ULL << 5))
void app_main(void) {
// 1. Configure GPIOs 2-5
gpio_config_t io_conf = {
.pin_bit_mask = OUTPUT_PIN_MASK, // Select pins
.mode = GPIO_MODE_OUTPUT, // Set as output
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE
};
gpio_config(&io_conf);
Who is online
Users browsing this forum: PetalBot and 17 guests