Initializing And Configuring Uart - Bosch XDK110 Getting Started

Cross-domain development kit
Hide thumbs Also See for XDK110:
Table of Contents

Advertisement

Extension Bus Advanced Guide | XDK110
3.2 Initializing and configuring UART
This section describes how to initialize UART either to receive or transmit data. It also covers the necessary configuration
for the baud rate, the start bit, stop bit and parity bit. For that, the following interfaces will be used.
Code 1. Including the required UART interfaces
#include
"BSP_ExtensionPort.h"
#include
"BCDS_MCU_UART.h"
#include
"BCDS_UARTTransceiver.h "
BSP_ExtensionPort.h
The
configuration of the Baud rate, the start, stop and parity bits will be implemented.
The following Table shows an excerpt of the functions used to implement a working UART connection.
Table 2. Function overview
FUNCTION
BSP_ExtensionPort_Connect()
BSP_ExtensionPort_ConnectUart()
BSP_ExtensionPort_SetUartConfig()
BSP_ExtensionPort_GetUartHandle()
BSP_ExtensionPort_EnableUart()
BCDS_MCU_UART.h
The interface
transmitted via UART over the function
Furthermore, the interface
store the incoming data and to send out data streams greater than one UART data packet. 

is used to connect and configure the UART interface on the Extension Bus. With it, the
BSP_ExtensionPort.h
DESCRIPTION
This function is called to enable the power control for the
extension bus and disables all GPIO pins to conserve power
This function is called to configure the corresponding UART
receive (RX) and transmit (TX) pins on the extension bus
This function is called to configure UART settings, such as Baud
rate, start bit, stop bit and parity bit
This function returns the handle for the UART communication
holding all relevant configuration data
This function is called to enable the UART module for
transmitting and reading data
is used to initialize UART on the driver level to handle the events when data is received or
MCU_UART_Initialize()
BCDS_UARTTransceiver.h
.
is used to extend UART to add functionality such as a ring buffer to
8 24
|

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents