GR712RC unit tests 1.0
Bare-metal C++ hardware tests for the PLATO DPU (IAA-CSIC, 2019)
Loading...
Searching...
No Matches
uart_periph.cpp File Reference

Initialize the UART peripheral and start to transmit packets. More...

#include <cstdint>
#include <mcal/mcal.h>
#include <array>
Include dependency graph for uart_periph.cpp:

Go to the source code of this file.

Typedefs

typedef std::array< std::uint32_t, 64 > buffer_type

Functions

int main ()

Detailed Description

Initialize the UART peripheral and start to transmit packets.

Use case:
use_case uart_periph_configuration

Initialize the UART peripheral and start to tranmit packets with the ascii code 'T' using this interface. Once a packet is received it is forwarded to the output.

The baudrate is configured to be 9600 bps.

Returns
Never ends. Loop forever sending Ts.
Note
The program should be linked to be executed on the build-in SRAM of GR712RC: -T linkcmds-ahbram
It might be necessary to configure the serial port of the host. stty allos to set the speed of the interface. screen might be used as the receiver in the Host PC: $ screen 9600,cs1 echo might be used as the transmiter in the Host PC: $ echo -ne 'C' > /dev/ttyUSB0
Author
Juan Manuel Gómez jmgom.nosp@m.ez@i.nosp@m.aa.es

Definition in file uart_periph.cpp.

Typedef Documentation

◆ buffer_type

typedef std::array<std::uint32_t,64> buffer_type

Definition at line 45 of file uart_periph.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 47 of file uart_periph.cpp.