AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches
UART API interface

UART interface for the AFBR-S50 Reference Board CAN application. More...

Collaboration diagram for UART API interface:

Functions

void UART_API_Init (void)
 Initializes the UART API module.
 
void UART_HandleCommand (void)
 Handles incoming UART commands by invoking the corresponding methods.
 
void UART_Send1D (argus_results_t const *res)
 Prints measurement results via UART.
 

Detailed Description

UART interface for the AFBR-S50 Reference Board CAN application.


A simple UART interface to demonstrate the basic usage of the UART bus that comes with the AFBR-S50 Reference Board.

Function Documentation

◆ UART_API_Init()

void UART_API_Init ( void  )

Initializes the UART API module.


◆ UART_HandleCommand()

void UART_HandleCommand ( void  )

Handles incoming UART commands by invoking the corresponding methods.


Checks the incomming data queue and handles/invokes commands accordingly.

Note that this function must be called from thread level (not from interrupt service routines) in order to be executed correctly.

◆ UART_Send1D()

void UART_Send1D ( argus_results_t const *  res)

Prints measurement results via UART.


Print the recent measurement results:

     1. Time stamp in seconds since the last MCU reset.
     2. Range in mm (converting the Q9.22 value to mm)
     3. Amplitude in LSB (converting the UQ12.4 value to LSB)
     4. Signal Quality in % (100% = good signal).
     4. Status (0: OK, <0: Error, >0: Warning
Note
Sending data via UART creates a large delay which might prevent the API from reaching the full frame rate. This example sends approximately 80 characters per frame at 115200 bps which limits the max. frame rate of 144 fps: 115200 bps / 10 [bauds-per-byte] / 80 [bytes-per-frame] = 144 fps
Parameters
resA pointer to the latest measurement results structure.