Page 1 of 1

Set outputs with AT commands

Posted: Tue Aug 12, 2025 5:27 pm
by Materia_Labs
I'm trying to drive high the GPIO 19 and 22 PINs on the ESP-C6-MINI-1U module.
I'm doing it with AT+SYSREG because I have 3250 modules with AT V4.0.0 firmware .

The sequence I'm doing is this:
AT+RESTORE
OK
AT+SYSREG=1,0x600B4928,0x00001200 //MUX SET GPIO19
OK
AT+SYSREG=0,0x600B4928 //Read if the set is done
+SYSREG:0x0 (The register doesn't write)

AT+SYSREG=1,0x600B4934,0x00001200 //MUX SET GPIO22

AT+SYSREG=0,0x600B4934 //Read if the set is done
+SYSREG:0x0 (The register doesn't write)

AT+SYSREG=1,0x60091020,0x00480000 // Configure outputs
OK

AT+SYSREG=1,0x60091004,0x00480000 // Drive High the pins
OK


The main problem is that the mux doesn't write, but I just need to achiueve to set the two pins at logic level HIGH

Someone can please provide me the correct sequence?

Re: Set outputs with AT commands

Posted: Wed Aug 13, 2025 12:50 am
by Sprite
AT+SYSREG=1,0x600B4928,0x00001200 //MUX SET GPIO19
OK
AT+SYSREG=0,0x600B4928 //Read if the set is done
+SYSREG:0x0 (The register doesn't write)
Not sure where you got that address from. The TRM specifies the IO mux addresses start from at 0x60090000.

(Also note that GPIO19 by default is routed to the USB-JTAG-serial device. You may need to disable the PHY of that subsystem before the GPIO will react as you'd expect.)

Re: Set outputs with AT commands

Posted: Wed Aug 13, 2025 11:22 am
by Materia_Labs
Thank you Sprite for the support!

As you told me: PIN 19 and PIN 22 were not configured as GPIO

In fact SDIO Pin Mapping on ESP32-C6
The SDIO interface uses specific GPIO pins:
GPIO18: SDIO_CMD (Command line)
GPIO19: SDIO_CLK (Clock line)
GPIO20: SDIO_DATA0 (Data line 0)
GPIO21: SDIO_DATA1 (Data line 1)
GPIO22: SDIO_DATA2 (Data line 2)
GPIO23: SDIO_DATA3 (Data line 3)

This is the correct sequence that worked for me

AT+SYSREG=1,0x60090050,0x1a02 // Configure PIN 19 as GPIO (not SDIO)
AT+SYSREG=1,0x6009005C,0x1a02 // Configure PIN 22 as GPIO (not SDIO)
AT+SYSREG=1,0x60091020,0x00480000 // Enable GPIO19 & 22 as outputs
AT+SYSREG=1,0x60091004,0x00480000 // Drive HIGH (3.3V) GPIO19 & 22
AT+SYSREG=1,0x60091004,0x0 // Drive LOW GPIO19 & 22

Thank you for the support!

Re: Set outputs with AT commands

Posted: Thu Sep 04, 2025 8:45 am
by esp-at
@Sprite Thanks!