This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TM4C129XNCZAD:如何启用 UART1?

Guru**** 2124260 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1318618/tm4c129xnczad-how-to-enable-uart1

器件型号:TM4C129XNCZAD

您好!

我尝试使用以下代码测试 UART1端口、但无法正常工作。

还有其他东西需要添加或修改吗?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/uart.h"
#define UART_MODULE UART1_BASE
#define UART_GPIO_PORT GPIO_PORTB_BASE
#define UART_GPIO_TX GPIO_PIN_1
#define UART_GPIO_RX GPIO_PIN_0
#define BAUD_RATE 115200
uint32_t ui32SysClock;
void UARTInit(void)
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    解决了。