How do you change the BAUD rate in the AT Interface Application for BL65x smartBASIC modules?

The default baud rate in the AT Interface application is 115200. In order to change the baud rate within the AT Interface code there are two modifications required in the AT Interface files as shown below:

  1. Locate the following settings within the $autorun$.AT.Interface.BL652._.sb file which sets the baud to 115200 (highlighted):
    #define SREGINIT_VAL32_0 "\4C\1D\00\00\98\3A\00\00\00\C2\01\00\00\20\00\00\01\20\00\00"
    #define SREGINIT_MIN32_0 "\4C\1D\00\00\4C\1D\00\00\B0\04\00\00\01\00\00\00\01\00\00\00"
    #define SREGINIT_MAX32_0 "\1E\04\3D\00\1E\04\3D\00\40\42\0F\00\FF\FF\00\00\FF\FF\00\00"

     
    Modify the settings to set the Hex value for the desired BAUD rate in little endian format
    The example below will set it to 9600 baud (0x00 0x00 0x25 0x80)  as shown below (highlighted)
    #define SREGINIT_VAL32_0 "\4C\1D\00\00\98\3A\00\00\80\25\00\00\00\20\00\00\01\20\00\00"
    #define SREGINIT_MIN32_0 "\4C\1D\00\00\4C\1D\00\00\B0\04\00\00\01\00\00\00\01\00\00\00"
    #define SREGINIT_MAX32_0 "\1E\04\3D\00\1E\04\3D\00\40\42\0F\00\FF\FF\00\00\FF\FF\00\00"
  2. Locate the settings for S Register 302 in the $LIB$.SRegInterface.sb file: Modify the settings in #cmpif 0x00010000 : rc=BleEncode32(SregCache32$[0],115200,offset) to set the baud rate to the desired baud rate.

 

Categories

Products

Parts