Other Parts Discussed in Thread: SYSBIOS
Hi everyone,
I am currently using Uart0 and Uart2 to communicate with 2 different devices.
This is the configuration of the Uarts:
off_board_uart0_pins_default: uart0_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x970, PIN_INPUT | MUX_MODE0) /* (K25) uart0_rxd.uart0_rxd */
AM4372_IOPAD(0x974, PIN_OUTPUT | MUX_MODE0) /* (J24) uart0_txd.uart0_txd */
>;
};
off_board_uart2_pins_default: uart2_pins_default {
pinctrl-single,pins = <
AM4372_IOPAD(0x92c, PIN_INPUT | MUX_MODE1) /* (D14) mii1_tx_clk.uart2_rxd */
AM4372_IOPAD(0x930, PIN_OUTPUT | MUX_MODE1) /* (D13) mii1_rx_clk.uart2_txd */
>;
};
During DEBUG mode, everything was working fine.
- Channel 0 (uart0_txd): sending out the requests
- Channel 1 (uart0_rxd): receiving the correct responses
- Channel 2 (uart2_txd): sending out the requests
- Channel 3 (uart2_rxd): receiving the correct responses
However, after I FLASHED the device with the same binary that I was using in Debug Mode, the second device received corrupted data packets from Uart2_txd
- Channel 0 (uart0_txd): sending out the requests
- Channel 1 (uart0_rxd): receiving the correct responses
- Channel 2 (uart2_txd): sending out the requests
- Channel 3 (uart2_rxd): receiving CRC error (since the packets got corrupted)
I could not find the issue of the Uart2_txd line; therefore, I decided to create a simple Uart project to test UART2 to make sure it is not about timing. The test was:
- I have one AM437x board running the Uart project test from FLASH which will send the command: "AM 12111111111111111111\r\n" to UART2_TXD Line
- I have the second AM437x board running the same project in DEBUG MODE (to set up breakpoints), and it will read the command from UART2_TXD at UART0_RXD
NOTE: Everything works fine in DEBUG MODE
- To make sure Uart2_TXD sends out the correct data, I checked using Docklight as:
- However, after connecting UART2_TXD toUART0_RXD and setting up a breakpoint, I can see the corrupted data packet as:
I could not think up any reasons behind the issue of UART2 when everything ran just fine in DEBUG MODE but not after FLASHED the device.
Is there any chance that Uart2 needs to be set up differently in Firmware? Are any clocks set up that I missed?
Would you mind giving me some advice where the issues could be?
Thank you,
Sincerely,
Minh Vo