UART
uart.baud
Abbreviation
ua b
Access
get/set
Description
Sets the UART baud rate. If
raw
argument is NOT used,
baud rate
must be one of the following standard rates:
1200
,
2400
,
4800
,
9600
,
14400
,
19200
,
28800
,
38400
,
56000
,
57600
,
115200
,
128000
,
153600
,
230400
,
256000
,
460800
,
921600
.
Some UART baud settings may be excluded by the hardware platform. See the topic
UART Ranges
for your platform.
If the optional
raw
parameter is supplied, then the rate may be any value, with a minimum of
1098
.
After changing
uart.baud
,
save
and
reboot
to effect the change.
Get arguments
<uart#>
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
Set arguments
<uart#> <baud rate> [raw]
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
-
<baud rate>
is an integer either:- selected from the standard rates in the description above.
-
if the
raw
option is provided, any rate in the range1098
-18000000
.
Default
115200
Platforms
- WGM160P
Properties
- uart_update to apply change
- save and reboot to apply change
- available in Safe Mode
- preserved by NVM Backup
- lockable: see system.variable_lock
Gecko OS Plugin
Get example
Get baud rate for UART
0
:
> get uart.baud 0
R000008
115200
Set example
Set UART
0
baud rate to
460800
:
> set uart.baud 0 460800
R000008
Set OK
uart.data
Abbreviation
ua d
Access
get/set
Description
The number of UART data bits to use.
For UART ranges for your platform, see your hardware documentation.
Get arguments
<uart#>
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
Set arguments
<uart#> <# data bits>
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
-
<# data bits>
has a range depending on your platform.
Default
8
Platforms
- WGM160P
Properties
- uart_update to apply change
- save and reboot to apply change
- available in Safe Mode
- preserved by NVM Backup
- lockable: see system.variable_lock
Gecko OS Plugin
Get example
Get data bits setting for UART
0
:
> get uart.data 0
R000003
8
Set example
Set UART
0
to use
8
data bits:
> set uart.data 0 8
R000008
Set OK
uart.flow
Abbreviation
ua f
Access
get/set
Description
Turn on/off UART hardware flow control.
Note
: to guarantee that no characters are dropped,
uart.flow
must be turned
on
. This applies to any baud rate.
Get arguments
<uart#>
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
Set arguments
<uart#> off/on
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
-
off/on
:on
turns UART flow control on;off
turns UART flow control off.
Default
off
Platforms
- WGM160P
Properties
- uart_update to apply change
- save and reboot to apply change
- available in Safe Mode
- preserved by NVM Backup
- lockable: see system.variable_lock
Gecko OS Plugin
Get example
Get flow control setting for UART
1
:
> get uart.flow 1
R000005
off
Set example
Turn off flow control for UART
1
:
> set uart.flow 1 off
R000008
Set OK
uart.parity
Abbreviation
ua p
Access
get/set
Description
Configure UART parity selection.
Get arguments
<uart#>
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
Set arguments
<uart#> none/even/odd
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
-
none/even/odd
:-
none
: no parity checking -
even
: even parity checking -
odd
: off parity checking
-
Default
none
Platforms
- WGM160P
Properties
- uart_update to apply change
- save and reboot to apply change
- available in Safe Mode
- preserved by NVM Backup
- lockable: see system.variable_lock
Gecko OS Plugin
Get example
Get parity setting for UART
1
:
> get uart.parity 1
R000006
none
Set example
Set parity to
odd
for UART
1
:
> set uart.parity 1 odd
R000008
Set OK
uart.powersave.mode
Abbreviation
ua m
Access
get/set
Description
Enable or disable UART powersave for the specified UART.
You can specify the UART and the mode, or supply a comma-separated list of uart#:mode as shown below.
See:
Get Arguments
<uart#>
where:
-
<uart#>
is one of the following:-
uart0
-
uart1
-
Set Arguments
Either:
<uart#> <mode>
Or:
<uart#>:<mode>,<uart#>:<mode>
where:
-
<uart#>
: UART ID,uart0
/uart1
-
<mode>
=0
: DISABLED: No powersave supported -
<mode>
=1
: WAKE_EXTERNAL: Wake on an externally configured source (e.g. system.powersave.wakeup_gpio_mask ).
Default
0
Platforms
- WGM160P
Gecko OS Plugin
Get example
Get mode of specified UART
> get uart.powersave.mode uart0
R000003
0
Set example
UART and mode
> set uart.powersave.mode uart0 1
R000008
Set OK
Set example
Comma separated list:
> set uart.powersave.mode uart0:1,uart1:1
R000008
Set OK
uart.stop
Abbreviation
ua s
Access
get/set
Description
The number of UART stop bits to use.
Get arguments
<uart#>
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
Set arguments
<uart#> <# stop bits>
where:
-
<uart#>
is the UART specification. Allowed values are:-
0
-
1
-
-
<# stop bits>
is the stop bits specification. Allowed values are:-
1
-
2
-
Default
1
Platforms
- WGM160P
Properties
- uart_update to apply change
- save and reboot to apply change
- available in Safe Mode
- preserved by NVM Backup
- lockable: see system.variable_lock
Gecko OS Plugin
Get example
Get stop bits setting for UART
0
:
> get uart.stop 0
R000003
1
Set example
Set stop bits to
1
for UART
0
:
> set uart.stop 0 1
R000008
Set OK