Re:how to
Taking a look at the uart_echo example:
In the function main, after setting the system clock and configuring the RIT display, UART0 is configured to use GPIO A0 and GPIO A1 as the RX and TX pins. The first thing that is done is to enable both of the peripherals (UART0 and GPIOA) with a call SysCtlPeripheralEnable().
You will then see a call to GPIOPinTypeUART(), which configures the GPIO port to be controlled by the UART. This is all that is required to enable GPIO A0/A1 to work as UART pins.
Depending on the peripheral you are working with, there are additional GPIO APIs that setup GPIO pins for use with SSI, I2C, etc.
Hope this helps. --Bobby
login or register to reply
|