UART 250k baudrate in MarsBoard

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART 250k baudrate in MarsBoard

Jump to solution
1,386 Views
mafiawolf
Contributor II

Anyone can help me to configure UART to 250k baud rate with 2 stop bit please?
I want it to handle DMX512 signal but I cant find any solution over Internet
I am now using MarsBoard by Embest-tech with 4 UART (UART1, UART3, UART4, UART5) and using C code in Linux.

I've used this
https://jim.sh/ftx/files/linux-custom-baudrate.c

with

void DMXInit(){

int u = open("/dev/ttymxc3", )WRONLY|O_NOCTTY|O)NDELAY);

if(u< 0)

     error("....");

else

     printf(".....");

serial_open(u, 250000);

}

And I use this to send data from dmx_data[512] array.

void DMXSend(int port, uint8_t * buffer, uint32_t size){

write(port, buffer, size);

}

And connect to UART 3

..And "stty -F ttymxc3" is reply "speed 3000000 baud"

So, I dont think it work!

Anyone try this?

Please help me!

Thanks for your reading!

Labels (3)
0 Kudos
Reply
1 Solution
1,189 Views
mafiawolf
Contributor II

AAAa..
I've solved this problem, just 've used termios2

:smileygrin:

View solution in original post

0 Kudos
Reply
3 Replies
1,190 Views
mafiawolf
Contributor II

AAAa..
I've solved this problem, just 've used termios2

:smileygrin:

0 Kudos
Reply
1,189 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Have you checked with a scope to verify which baudrate is configured?

That would  provide more information. It could be that it is not possible to get that baudrate with  reference clock for the UART module and that needs to be changed, or just the message output is incorrect. Which Linux version are you using?

Best Regards,

Alejandro

0 Kudos
Reply
1,189 Views
mafiawolf
Contributor II

Anyone can help?

0 Kudos
Reply