请教下各位前辈,我想测试UART1通信情况
从SD卡启动,调试串口UART0上打印 48022000.serial: ttyO1 at MMIO 0x48022000,是不是UART1就已经始能了,硬件或软件上都不需要改动,只要实现串口测试程序就好了?
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.
请教下各位前辈,我想测试UART1通信情况
从SD卡启动,调试串口UART0上打印 48022000.serial: ttyO1 at MMIO 0x48022000,是不是UART1就已经始能了,硬件或软件上都不需要改动,只要实现串口测试程序就好了?
感谢您的回复,我在u-boot下找到您说的那个头文件,“将其中和串口相关的宏都配置成需要的串口”,这是什么意思?能详细给我讲讲吗?
这个文件里,跟串口有关的宏只有下面这些,是改这里还是要改其他什么地方?
170 /* NS16550 Configuration */
171 #define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
172 #define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
173 #define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
174 #define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
175 #define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
176 #define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
177 #define CONFIG_BAUDRATE 115200
您好,我想再请教您一个问题,dts文件中有关uart1的配置如下
76 uart1_pins_default: pinmux_uart1_pins_default {
77 pinctrl-single,pins = <
78 0x178 (PIN_INPUT | MUX_MODE0) /* uart1_ctsn.uart1_ctsn */
79 0x17C (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn.uart1_rtsn */
80 0x180 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rxd.uart1_rxd */
81 0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */
82 >;
83 };
84
85 uart1_pins_sleep: pinmux_uart1_pins_sleep {
86 pinctrl-single,pins = <
87 0x178 (PIN_INPUT_PULLDOWN | MUX_MODE7)
88 0x17C (PIN_INPUT_PULLDOWN | MUX_MODE7)
89 0x180 (PIN_INPUT_PULLDOWN | MUX_MODE7)
90 0x184 (PIN_INPUT_PULLDOWN | MUX_MODE7)
91 >;
92 };
uart1_pins_default和 uart1_pins_sleep,如何对应代码,或者说怎么在代码里能找到呢,我搜索了整个目录,都没有找到uart1_rxd.uart1_rxd,内核是怎么取到这些值的?我用的是SDK 07.00,\arch\arm\mach-omap2下面没有board-am335xevm.c,uart初始化的代码在哪呢?