4. UART Interface
DA1453x DA1458x contains two instances of the UART block, that is, UART and UART2. In this document we are only showing how to initiate uart communication on SDK6 To have a better view of the uart interface please take a look at DA1453x or DA1458x datasheets.
4.1. Features
16-byte transmit and receive FIFOs
Hardware f low control (CTS/RTS) (UART only)
Shadow registers to reduce sof tware overhead and a sof tware programmable reset is included
Transmitter Holding Register Empty (THRE) interrupt mode
Programmable serial data baud rate
4.2. UART configuration in SDK6:
UART examples
Numerous examples within the ‘BLE SDK6 examples’ repository (accessible at BLE SDK6 examples ) demonstrate the utilization of UART for both output display and input reception from a terminal. It is highly recommended to explore these examples for valuable insights and practical implementations.
We will now enable serial capability so that a terminal emulator (such as Tera Term etc.) can be used to view debug information output by the application running on the DA1453x/DA1458x.
We can enable the UART with a simple modification to the configuration file: da145..._config_basic.h
(do the change in the config file regarding the name of your target here our target is DA14531 so the modification need to be done in da14531_config_basic.h
). Scroll down and find the #undef CFG_PRINTF
statement and change it to:
+ #define CFG_PRINTF
- #undef CFG_PRINTF
In user_periph_setup.h
change the GPIO used as the UART transmit output by the DA14531 or DA1453x DEVKT-P and USB to P0_5 as follows:
#define UART2_TX_PIN GPIO_PIN_5
This will automatically select and configure the proper GPIO for the UART TX. In order to give ourselves access to a more user friendly API, we will add the following include statement to user_empty_peripheral_template.c
:
#include "arch_console.h"
We can now use the following functions we wrote in user_on_init(void)
and user_on_set_dev_config_complete(void)
:
arch_puts()
, to transmit a simple string via the UART
arch_printf()
, to format and transmit a string via the UART
4.3. Testing the Serial Port
- Configure your Terminal Emulator as follows:
Baud Rate: 115200
Data: 8 bits
Parity: None
Stop Bits: 1
Flow Control: None
Build the project and load it in to target.
When you run the application using the serial port you should see the following be transmitted via the UART:

Figure 6 UART output from initial example project