ESP32c6: Enable external antenna on ESP AT Firmware

Hi All

I’m running the ESP AT firmware on the XIAO ESP32C6 board. How can I set it to use external antenna? I know Pin 3 needs to be set LOW and Pin 14 HIGH. But I’m trying to find a way to do this from AT firmware.

From looking at AT command list, there is a command to set register values (AT+SYSREG). In theory this should work (note the register 0x803 and 0x805 are from TRM as ‘GPIO Output Enable’ and ‘GPIO Output Value’ respectively):

AT+SYSREG=1,0x803,0x4008  // Set GPIO3 and GPIO14 as outputs
AT+SYSREG=1,0x805,0x4000  // Set GPIO3 low and GPIO14 high

However it doesn’t respond with OK and simply responds with “ready” (maybe its crashing and rebooting?)

I tried to test this by setting GPIO15 (LED) to high with

AT+SYSREG=1,0x803,0x8000  // Set GPIO15 output
AT+SYSREG=1,0x805,0x8000  // Set GPIO15 high

However this is not working…(no light)…can anyone help?

Hi there,
So I see the syntax looks good,
Based on the G man,
" The AT command to set register values is “AT+SYSREG”; it allows you to read or write values to specific system registers within a device, typically used in embedded systems like ESP32 modules where you need to access low-level hardware settings.

Key points about AT+SYSREG:

  • Function: Read or write values to system registers.
  • Syntax: AT+SYSREG=<direct>,<address>[,<write value>]
    • <direct>: “0” to read a register, “1” to write a register.
    • <address>: The address of the register you want to access.
    • <write value>: The value to write to the register (only used when writing).

Example usage:

  • Read the value of register at address 0x10: AT+SYSREG=0,0x10
  • Write the value “0x5A” to register at address 0x20: AT+SYSREG=1,0x20,0x5A "
 AT+RESTORE
OK
 ready

 AT+SYSREG=1,0x60009010,0x00001800  //Configure IO_MUX, drive strength, pull-up and pull-down mode of GPIO3
OK

AT+SYSREG=1,0x60004024,0x00000008  //Configure GPIO3 output mode 
OK

 AT+SYSREG=1,0x6000400C,0x00000008  //output low level
 OK

 AT+SYSREG=1,0x60004008,0x00000008  //output high level 
 OK

Try full values for the 32 bit registers PAGE 53 or the manual

3.1.27 AT+SYSREG: Read/Write the Register
Set Command
Command:
AT+SYSREG=<direct>,<address>[,<write value>]
Response:
+SYSREG:<read value> // Only in read mode
OK
Parameters
• <direct>: read or write register.
– 0: read register.
– 1: write register.
• <address>: (uint32) register address. You can refer to Technical Reference 
Manuals.
• <write value>: (uint32) write value (only in write mode).
Note
• AT does not check address. Make sure that the registers you are operating 
on are valid

HTH
GL :slight_smile: PJ :v:

your close you get it.