nrf9160

Set command

The set command writes the MAGPIO configuration to device RAM.

The command configuration is stored to Non-volatile Memory (NVM) approximately every 48 hours and when the modem is set to minimum functionality mode with the +CFUN=0 command. The configuration can be stored to NVM with the %XFSSYNC command when the Production Test Image (PTI) modem firmware is used. The stored configuration is applied when the device is powered on.

Active %XPOFWARN warning blocks the storing to NVM.v1.3.x≥2

This command has been updated in v0.7.1 of this document. The earlier format described in v0.7 of this document is still valid, but the new format is recommended.

Syntax:

%XMAGPIO=<gpio_0>,<gpio_1>,<gpio_2>,<num_ranges>,<state_0>,<flo_0>,<fhi_0><state_1>,<flo_1>,
<fhi_1>,...

A command without any parameters deletes the previously written values.

The set command parameters and their defined values are the following:

<gpio_x>
0 – MAGPIO_x is not used
1 – MAGPIO_x used
<num_ranges>
The number of frequency ranges, maximum value 12
<state_y>
Settings of the MAGPIO pins for the range x that follows
<flo_y>
Frequency range low value when the setting is active, in MHz
<fhi_y>
Frequency range high value when the setting is active, in MHz

The following table contains an example configuration for an antenna tuner:

Table 1. Example configuration for an antenna tuner
  State MAGPIO2 MAGPIO1 MAGPIO0 Low MHz High MHz
Unused 0 0 0 0 - -
LTE(746–803) 1 0 0 1 746 803
LTE(698–746) 2 0 1 0 698 746
LTE(1710–2200) 2 0 1 0 1710 2200
LTE(849–894) 3 0 1 1 849 894
LTE(894–960) 4 1 0 0 894 960
Unused 5 1 0 1 - -
LTE(803–849) 6 1 1 0 803 849
GNSS 7 1 1 1 1574 1577

The following command example writes seven ranges to device RAM:

AT%XMAGPIO=1,1,1,7,1,746,803,2,698,746,2,1710,2200,3,849,894,4,894,960,6,803,849,7,
1574,1577
OK

The following command example writes three ranges to device RAM:

AT%XMAGPIO=1,1,1,3,0,1574,1577,1,705,747,6,748,804
OK

The following command example deletes the previously written values:

AT%XMAGPIO
OK