Bosch XDK110 Getting Started page 9

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

Advertisement

Extension Bus Advanced Guide | XDK110
Table 3 shows an excerpt of the used functionsTable 3. Function overview
FUNCTION
UARTTransceiver_Initialize()
UARTTransceiver_StartInAsyncMode()
UARTTransceiver_ReadData()
UARTTransceiver_WriteData()
Code 2 shows an outline of the first configurations to the UART module.
Code 2. UART Extension Bus configuration
// Place this code snippet inside AppInitSystem() after BCDS_UNUSED(param2);
BSP_ExtensionPort_Connect();
BSP_ExtensionPort_ConnectUart();
BSP_ExtensionPort_SetUartConfig(BSP_EXTENSIONPORT_UART_PARITY,
BSP_EXTENSIONPORT_UART_NO_PARITY, NULL);
BSP_ExtensionPort_SetUartConfig(BSP_EXTENSIONPORT_UART_BAUDRATE, UINT32_C(9600), NULL);
BSP_ExtensionPort_SetUartConfig(BSP_EXTENSIONPORT_UART_STOPBITS,
BSP_EXTENSIONPORT_UART_STOPBITS_ONE, NULL);
BSP_ExtensionPort_Connect()
First, the function
disable all pins on the Extension Bus. Afterwards, the function
pins PB9 and PB10 on the Extension Bus to be used as TX and RX pins.
BSP_ExtensionPort_SetUartConfig()
Afterwards,
parity bits. As for this outline, a baud rate of 9600, one stop bit and no parity bit is configured.
Now the initialization of the UART module on the driver level can begin. For that, a global variable of the type
UARTTranceiver_T
as shown in Code 3 needs to be declared.
Code 3. Declaration of a global variable of type
static
UARTTransceiver_T
This variable will hold all relevant information in regards to the UART data transmission as well as the UART module itself.
The specific information will be for example the amount of received data stored in an internal ring buffer.

DESCRIPTION
This function is used to initialize the UART transceiver module
This function is used to start the UART transceiver for
asynchronous data transmission
This function is used to read stored UART data from the UART
transceiver
This function is used to send multiple UART data packets via
the UART transceiver
is called to enable the power control on the Extension Bus and to
is called to configure the baud rate, the number of stop bits and the
UARTTranceiver_T
UartTransceiverInstance;
BCDS_UARTTransceiver.h
BSP_ExtensionPort_ConnectUart()
9 24
|
configures the UART

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents