I’m working on a project on Humming Board IMX8MP, in that I’m working with UART for Video stream out. We are able to transmit video stream with 1.5Mbps i.e. with baud rate 1500000. For video streaming, we are using gstreamer pipeline.
As per the data sheet, UART can support up to 4Mbps and we would like to use it to the fullest.
Could anyone help me with this. ???
We are using following commands to set Baud Rate :
stty -F /dev/ttymxc2 1500000 // set baudrate
stty -F /dev/ttymxc2 -crtscts // disable cts-rts
Same query I have posted on NXP Community Forum and I’ve got below responses -
Second response talks about changing the UART Module clock in Kernel Device Tree. Can anyone help me with this.?? Which exact file I need to update.
Looking forward to a positive and quick response.
Thanks and Warm Regards,
The default uartclk is set for 80Mhz which is plenty fast enough to support 4Mbps on ttymxc2. Are you having an issue setting the baudrate to 4000000? If I set
stty -F /dev/ttymxc2 4000000 then the serial port reports it is set correctly.
root@imx8mpsolidrun:/sys/class/tty/ttymxc2# stty -F /dev/ttymxc2 -a
speed 4000000 baud; rows 0; columns 0; line = 0;
Dear @jnettlet ,
I’ve tried, but its not working.
Are you using a kirkstone based Yocto image?
Dear @jnettlet ,
I’m using Hardknott.
Most likely this is a limitation of the hardknott kernel then. I would recommend switching to kirkstone and testing.
@jnettlet We almost at the stage of deployment of our product. There’s no time for new experiments. Is it possible to do something to support this with Hardknott…??
I have just tested with our prebuilt hardknott image and also didn’t have problem. This seems to be specific to your build, or perhaps you are using an older hardknott release?
root@imx8mpsolidrun:~# stty -F /dev/ttymxc2 -a
speed 4000000 baud;stty: /dev/ttymxc2
line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc
root@imx8mpsolidrun:~# uname -a
Linux imx8mpsolidrun 5.10.72-lts-5.10.y+g49b974f6daa1 #1 SMP PREEMPT Tue Nov 23 06:02:20 UTC 2021 aarch64 GNU/Linux
I’m also able to set it to 4Mbps speed in prebuilt image. I’ll check what is wrong with my current build.
Thanks for your response.
I’m able to solve the issue with the below response I got on NXP Forum -