5.5.1 Set UART Baud Rate (SB,<H8>,<H8>,<H8>, <H8>)

Format: SB,<hex8>[,<00-01>,<00-03>,<00,01>]

This command sets the baud rate of the UART communication. The user can query the existing configuration values using the GB command. The input parameter is an 8-bit hex value in the range of 00-0B, representing baud rate from 2400-921600 (see the following table). The SB command also supports three optional parameters to configure the UART parity and stop bits.
  • The first parameter sets the desired baud rate.
  • The second parameter decides to Enable/Disable parity.
  • Use the third parameter to set the Parity mode (see Table 5-27).
  • The fourth parameter sets the desired stop bits.
Table 5-25. UART Baud Rate Settings

Setting

Baud Rate

00

921600

01

460800

02

230400

03

115200

04

57600

05

38400

06

28800

07

19200

08

14400

09

9600

0A

4800

0B

2400

The second parameter is used to enable or disable the parity check (see the following table).

Table 5-26. UART Parity Check Settings
Setting Parity Check
00 Disable
01 Enable

The third parameter is used to select the Parity mode (see the following table), which works only after enabling the parity check.

Table 5-27. UART Parity Mode Settings
Setting Mode
00 Odd
01 Space
02 Even
03 Mark
Table 5-28. UART Stop Bits
Setting Stop Bits
00 1
01 2
Default: 03
Example: SB,07 // Set the UART baud rate to 19200
SB,04,01,02,00 // Set the UART baud rate to 57600
// Enable the parity check as Even mode
// Set the stop bits to 1 bit
Response: AOK // Success
Err // Syntax error or invalid parameter
Note: The PDS stores these parameters. The parameters are effective after reboot.