GPIO_0 = HIGH: Initial value based on your information
GPIO_3 = LOW: Power is supplied to the RF switch
GPIO_14 = HIGH: Select external antenna
GPIO_15 = LOW: Turn on the LED
If you want to set the registers in the example of the above, try the following.
Please read “ESP32-C6 Technical Reference Manual” section carefully for more details.
7.5 Peripheral Output via GPIO Matrix
7.5.3 Simple GPIO Output
7.15.1 GPIO Matrix Register Summary
5.3.5 Modules/Peripherals Address Mapping
AT+SYSREG=1, 0x60091020, 0x0000C009 // enable GPIO0, 3, 14, 15
AT+SYSREG=0, 0x60091020 // check
AT+SYSREG=1, 0x60091004) = 0x00004001 // GPIO0=HIGH, 3=LOW, 14=HIGH, 15=LOW
AT+SYSREG=0, 0x60091020 // check
The following graph of my experiment shows how much sensitivity increase can be expected depending on the state of the RF switch and the presence or absence of the antenna.
‘XIAO_ESP32C6 Switching between builtin and external antenna - #16 by msfujino’
edit
There was a mistake in the code, which has been corrected.
AT+SYSREG=1, 0x60091020, 0x0000C009 // enable GPIO0, 3, 14, 15
AT+SYSREG=0, 0x60091020 // check
AT+SYSREG=1, 0x60091004) = 0x00004001 // GPIO0=HIGH, 3=LOW, 14=HIGH, 15=LOW
AT+SYSREG=0, 0x60091004 // check