Can Pullups or Pulldowns be Disabled on Default UART Pins

The BL65x is delivered with the smartBASIC runtime FW loaded and no smartBASIC application. In this configuration the module will boot into smartBASIC Interactive mode and the default pins for the UART at startup are set as per:

  • RTS: digital out, no pull, default high
  • TXD: digital out, no pull, default high
  • CTS: digital in, pull down
  • RXD: digital in, pull up

Startup flow is as follows:

  • sB engine starts
  • If there is no autorun application - UART is opened (default parameters)
  • If there is an autorun application - UART is not opened
    • If the autorun application uses print - UART is opened (default parameters)
    • If the autorun application uses UARTOPEN - UART is opened (custom parameters)

 

The pull up/down options can be changed in the smartBASIC application only when the UART is not open. If the $autorun application has opened the UART by using a print statement or calling UARTOPEN() then the UART must first be closed by calling the UARTCLOSE() function.

In the smartBASIC application when the UART port has been closed the code can call GpioSetFunc() to configure the desired GPIO parameters.

The smartBASIC application can use UARTOPEN() function to now enable the UART port. UARTOPEN() does not configure GPIO pull up/down configurations keeping the desired GPIO configurations intact.

Categories

Products