Hi I am using Jetson AGX Xavier, I wanted to test UART at higher baud rate 12Mbps.
As termios supports up to 4Mbps only. So I used ioctl configurations. And I am able to test the UART at 12 Mbps on 40 pin header connector, UARTA (THSO).
I am using Write and Read threads. I will send 256 bytes of data from write thread and will be read from Read thread(UART TX and RX lopped back using a wire). But looks it is not consistent. Sometimes It works and some times not.
Below is the configuration that I used :
ioctl(fd, TCGETS2, &tty);
tty.c_cflag &= ~CBAUD;
tty.c_cflag |= BOTHER;
tty.c_cflag |= CLOCAL;
tty.c_cflag |= CSTOPB;
tty.c_ispeed = 12000000;
tty.c_ospeed = 12000000;
retStatus = ioctl(fd, TCSETS2, &tty);
And I verified for the clock set for the UARTA
sudo cat /sys/kernel/debug/bpmp/debug/clk/clk_tree | grep uart
uartc 1 1828571 1 0
uartg 0 38400000 0 0
aon_uart_fst_mipi_cal 0 38400000 0 0
uart_fst_mipi_cal 0 68000000 0 0
uarta 0 204000000 0 0
uartb 0 204000000 0 0
uartd 0 204000000 0 0
uarte 0 204000000 0 0
uartf 0 408000000 0 0
uarth 0 204000000 0 0
Please let me know If I am missing any configuration.
Best Regards,
Prasanna