# Baud rate is not getting set for more than 1500000 (1.5Mbps)

**URL:** <https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629>\
**Category:** NXP i.MX8M Plus\
**Tags:** iMX8M-plus\
**Created:** [April 21, 2023, 5:01am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629 "2023-04-21T05:01:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.lokesh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/j.lokesh/32/146_2.png) [@j.lokesh](https://community.solid-run.com/u/j.lokesh)\
**Post date:** [April 21, 2023, 5:01am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/1 "2023-04-21T05:01:42Z")

</div>

Hello there,

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 :

```auto
stty -F /dev/ttymxc2 1500000 // set baudrate
stty -F /dev/ttymxc2 -crtscts // disable cts-rts

```

---

<div class="post-metadata">

**Author:** ![j.lokesh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/j.lokesh/32/146_2.png) [@j.lokesh](https://community.solid-run.com/u/j.lokesh)\
**Post date:** [April 26, 2023, 6:24am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/2 "2023-04-26T06:24:54Z")

</div>

Hello there,  
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.**

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/solid_run/original/1X/432b7e9b22f1938664a04e0597c1773a22f507e1.png)  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/solid_run/original/1X/74cd7abe98354903fa787f62f7a36c20abdadb57.png)

Looking forward to a positive and quick response.  
Thanks and Warm Regards,  
Lokesh

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [April 26, 2023, 7:03am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/3 "2023-04-26T07:03:16Z")

</div>

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.

```auto
root@imx8mpsolidrun:/sys/class/tty/ttymxc2# stty -F /dev/ttymxc2 -a
speed 4000000 baud; rows 0; columns 0; line = 0;

```

---

<div class="post-metadata">

**Author:** ![j.lokesh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/j.lokesh/32/146_2.png) [@j.lokesh](https://community.solid-run.com/u/j.lokesh)\
**Post date:** [April 28, 2023, 5:31am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/4 "2023-04-28T05:31:26Z")

</div>

Dear @jnettlet ,

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/solid_run/original/1X/cab05646d23a4712b1af28619179e7a14d2f8727.jpeg)

I’ve tried, but its not working.

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [April 28, 2023, 5:34am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/5 "2023-04-28T05:34:45Z")

</div>

Are you using a kirkstone based Yocto image?

---

<div class="post-metadata">

**Author:** ![j.lokesh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/j.lokesh/32/146_2.png) [@j.lokesh](https://community.solid-run.com/u/j.lokesh)\
**Post date:** [April 28, 2023, 5:42am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/6 "2023-04-28T05:42:13Z")

</div>

Dear @jnettlet ,  
I’m using Hardknott.

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [April 28, 2023, 5:43am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/7 "2023-04-28T05:43:38Z")

</div>

Most likely this is a limitation of the hardknott kernel then. I would recommend switching to kirkstone and testing.

---

<div class="post-metadata">

**Author:** ![j.lokesh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/j.lokesh/32/146_2.png) [@j.lokesh](https://community.solid-run.com/u/j.lokesh)\
**Post date:** [April 28, 2023, 5:46am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/8 "2023-04-28T05:46:51Z")

</div>

@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…??

---

<div class="post-metadata">

**Author:** ![jnettlet](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/jnettlet/32/62_2.png) [@jnettlet](https://community.solid-run.com/u/jnettlet)\
**Post date:** [April 28, 2023, 6:52am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/9 "2023-04-28T06:52:49Z")

</div>

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?

```auto
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

```

---

<div class="post-metadata">

**Author:** ![j.lokesh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/j.lokesh/32/146_2.png) [@j.lokesh](https://community.solid-run.com/u/j.lokesh)\
**Post date:** [April 28, 2023, 7:07am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/10 "2023-04-28T07:07:49Z")

</div>

@jnettlet  
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.

---

<div class="post-metadata">

**Author:** ![j.lokesh](https://dub1.discourse-cdn.com/flex005/user_avatar/community.solid-run.com/j.lokesh/32/146_2.png) [@j.lokesh](https://community.solid-run.com/u/j.lokesh)\
**Post date:** [April 28, 2023, 8:49am UTC](https://community.solid-run.com/t/baud-rate-is-not-getting-set-for-more-than-1500000-1-5mbps/629/11 "2023-04-28T08:49:36Z")

</div>

I’m able to solve the issue with the below response I got on NXP Forum -

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/solid_run/original/1X/99ac5e6152e1d1f481143343cc4a39aa9a49d4c2.png)
