This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

UART driver polling samples

Overview

需要注意配置: 将需要使用的串口 属性中的status设置成okay 启用串口

zephyr/boards/arm/csk6002_9s_nano/csk6002_9s_nano.dts &uart0 {

pinctrl-0 = <&pinctrl_uart0_rx_default &pinctrl_uart0_tx_default>; pinctrl-names = “default”; current-speed = <115200>; // 波特率 status = “okay”;

};

boards/csk6002_9s_nano.overlay /* UART alternate function */ pinctrl_uart0_rx_default: uart0_rx_default{

pinctrls = <&pinmuxa 6 2>; //rx pin

};

pinctrl_uart0_tx_default: uart0_tx_default{

pinctrls = <&pinmuxa 3 2>; //tx pin

};

轮寻方式,收到什么返回什么

Building and Running

lisa zep build -b csk6002_9s_nano

lisa zep flash