Files
libopencm3-examples/examples/lm4f/stellaris-ek-lm4f120xl/uart_echo_simple
Alexandru Gagniuc adddf9e418 lm4f: Update examples to the new GPIO API
We updated the GPIO API to use the AHB bus; however the AHP aperture for
GPIO ports A through J needs to be explicitly enabled at runtime. Accessing
the AHB aperture otherwise hardfaults.

To make the examples work again, we call gpio_enable_ahb_aperture() at the
start of main().

Since we're at it, we also take out the ugly register accesses in favor
of the new gpio functions.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2013-06-06 11:26:59 -05:00
..
2013-05-10 15:42:16 -05:00
2013-05-10 15:42:16 -05:00

------------------------------------------------------------------------------
README
------------------------------------------------------------------------------

This example demonstrates the ease of setting up the UART with libopencm3.
Basic UART echo is achieved by using blocking reads and writes. The UART is set
up as 921600-8N1.
PA0 is the Rx pin, and PA1 is the Tx pin (from the LM4F perspective). These
pins are connected to the CDCACM interface on the debug chip, so no hardware is
necessary to test this example. Just connect the debug USB cable and use a
terminal program to open the ACM port with 921600-8N1.

For example:
$ picocom /dev/ttyACM0 -b921600