GPIO control via AT commands

I am currently working with a GM02SP-based design and the Nektar EVK, using firmware version UE8.2.0.5. I need to control GPIO5 (PCM_FS) as a digital output during normal operation in order to drive an RF antenna-switch.

I have reviewed the AT Commands Reference Manual (LR 8.2) and attempted to use the AT+SMGT GPIO control command in manufacturing mode. The procedure used was:

AT+CFUN=5
AT+SMGT=0,0,0x20,0,0,0x20
AT+SMGT=0,0x20,0,0,0x20,0
AT+SMGT=0,0,0x20,0,0,0x20

without success. Questions:

  1. Is GPIO5 / PCM_FS exposed as a controllable GPIO on the GM02SP with firmware UE8.2.0.5?
  2. If controllable:
    • What is the correct bitmask and parameter position for AT+SMGT to set GPIO5 high/low?

    • Is any pinmux configuration required to free PCM_FS from its peripheral function?

  3. If not controllable:
    • Is there a firmware option, configuration file, or custom build that allows PCM_FS to be reassigned as a GPIO for application use?
  4. Is there an alternative AT command or recommended method to control a general-purpose output pin during runtime for RF switch control?

Thank you very much.

Hello

Here is the way to use GPIO on GM02SP:
  1. Check if GPIO is enabled by AT command AT+SQNHWCFG. If GPIO5 function is enabled, you will get below result:
at+cfun=5
OK
at+sqnhwcfg=“gpio5”
+SQNHWCFG: gpio5: enable, polarity: normal, direction: output, value: low

OK
  1. Reset to normal mode and check GPIO5 status:
at^reset
OK

+SHUTDOWN

+SYSSTART

OK
at+sqngpio=“gpio5”
gpio5: normal output low

OK
  1. set GPIO5 to high and check its status:
at+sqngpio=“gpio5”,“normal”,“output”,“high”
OK
at+sqngpio=“gpio5”
gpio5: normal output high

OK

Hi Luis,

1\ In fact, GPIO5 is disable by default. Then you have to enter following command prior test it:

AT+CFUN=5

AT+SQNHWCFG=“gpio5”,”enable”

AT^RESET

2\ Following command set GPIO 5 to high with normal
polarity(GPIO as output):

AT+CFUN=5
AT+SMGT=0,0,0x20,0,0,0x20

This worked.
In my firmware version, GPIO5 is enabled by default.

Thank you very much.
Luis