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!
Solved! Go to Solution.
AAAa..
I've solved this problem, just 've used termios2
:smileygrin:
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
Anyone can help?