UART 250k baudrate in MarsBoard

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART 250k baudrate in MarsBoard

ソリューションへジャンプ
1,038件の閲覧回数
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!

ラベル(3)
0 件の賞賛
1 解決策
841件の閲覧回数
mafiawolf
Contributor II

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

:smileygrin:

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
842件の閲覧回数
mafiawolf
Contributor II

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

:smileygrin:

0 件の賞賛
841件の閲覧回数
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 件の賞賛
841件の閲覧回数
mafiawolf
Contributor II

Anyone can help?

0 件の賞賛