S32K144-lpuart

1.设置lpuart的gpio

2.添加并设置过lpuart模块

3.添加代码

1.设置lpuart的gpio

2.添加并设置过lpuart模块

S32K144-lpuart_第1张图片

寄存器状态

S32K144-lpuart_第2张图片

S32K144-lpuart_第3张图片

3.添加代码

  /* 初始化串口 */

  UART_Init(&lpuart1_uart_instance, &lpuart1_uart_Config0);

  /* 发送一条消息验证串口通信是否正常 */

  UART_SendDataBlocking(&lpuart1_uart_instance, (uint8_t *)Msg, strlen(Msg), TIMEOUT);

#define Msg "This example is an simple echo using UART_PAL\r\n"

#define TIMEOUT         200UL

/*串口接收函数*/

UART_ReceiveDataBlocking(&uart_pal1_instance, buffer, 10U, TIMEOUT)

你可能感兴趣的:(S32K144笔记,笔记)