AnsweredAssumed Answered

UART 250k baudrate in MarsBoard

Question asked by Giang Hoang Quoc Duong on Oct 6, 2015
Latest reply on Oct 15, 2015 by Giang Hoang Quoc Duong

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!

Outcomes