JC-ESP32P4-M3-DEV GPIO Pins problem

DickyOZ
Posts: 21
Joined: Sun Aug 03, 2025 9:40 am

JC-ESP32P4-M3-DEV GPIO Pins problem

Postby DickyOZ » Mon Apr 13, 2026 11:28 am

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.
Attachments
PinoutReal.jpg
PinoutReal.jpg (384.57 KiB) Viewed 103 times

DickyOZ
Posts: 21
Joined: Sun Aug 03, 2025 9:40 am

Re: JC-ESP32P4-M3-DEV GPIO Pins problem

Postby DickyOZ » Wed Apr 22, 2026 10:21 am

To use GPIO pins 2-5 on the JC-esp32-p4 board you need to configure the pins as follows:

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);

Everything works OK then.

Who is online

Users browsing this forum: No registered users and 12 guests