Set outputs with AT commands

Materia_Labs
Posts: 1
Joined: Thu Apr 18, 2024 1:39 pm

Set outputs with AT commands

Postby Materia_Labs » Tue Aug 12, 2025 5:27 pm

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?

Sprite
Espressif staff
Espressif staff
Posts: 10593
Joined: Thu Nov 26, 2015 4:08 am

Re: Set outputs with AT commands

Postby Sprite » Wed Aug 13, 2025 12:50 am

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

Materia_Labs
Posts: 1
Joined: Thu Apr 18, 2024 1:39 pm

Re: Set outputs with AT commands

Postby Materia_Labs » Wed Aug 13, 2025 11:22 am

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!
Last edited by Materia_Labs on Wed Aug 13, 2025 11:24 am, edited 1 time in total.

esp-at
Espressif staff
Espressif staff
Posts: 335
Joined: Mon May 09, 2022 3:00 am

Re: Set outputs with AT commands

Postby esp-at » Thu Sep 04, 2025 8:45 am

@Sprite Thanks!

Who is online

Users browsing this forum: No registered users and 1 guest