Hi all,
Is there baudrate can be low to 2400?
#define UART_BAUDRATE_2K4 417 // = 16000000 / (16 * 2400), actual baud rate = 2398.082, error = -0.08%
I see the baudrate set is this :
SetWord16(UART_IER_DLH_REG, (baudr&0xFF>>0x8));
SetWord16(UART_RBR_THR_DLL_REG,baudr&0xFF);
So, if I set buadrate is 2400,the baudr should be 2400: baudr =UART_BAUDRATE_2K4 ;
I test it,but not success.
Can you help me ?
thanks.
Keywords:
Device:
charge to SetWord16(UART_IER_DLH_REG, ((baudr&0xFF00)>>0x8));
修改为SetWord16(UART_IER_DLH_REG, ((baudr&0xFF00)>>0x8));
但要注意uart.c好象没有编译使用的是obj,所以要确认编译
thank you GumpYang.
I have get data now .but the data is not always right.
The baudrate error rate is high.
Can you help me?
thanks.
Hi,all.
set 2400 baudrate ,
#define UART_BAUDRATE_2K4 417 // = 16000000 / (16 * 2400)=416.666666 , actual baud rate = 2398.082, error = -0.08%
only set the UART_BAUDRATE_2K4 is 417,the flow is translated to pc in 2400 buadrate .
问题是有时错误字符也在flow.
wyh? how to solve it.
thanks.
I suspect you are not correct, I use the peripheral_examples/uart 5.0.3 test, different BPS (300/1200/2400) corresponding to the frequency data is (3333/833/417) can be normal communication.
个人怀疑您没有修改正确,我使用5.0.3的peripheral_examples/uart测试,不同的BPS(300/1200/2400)对应分频数据为(3333/833/417)都是可以正常通讯的。
I suspect you are not correct, I use the peripheral_examples/uart 5.0.3 test, different BPS (300/1200/2400) corresponding to the frequency data is (3333/833/417) can be normal communication.
个人怀疑您没有修改正确,我使用5.0.3的peripheral_examples/uart测试,不同的BPS(300/1200/2400)对应分频数据为(3333/833/417)都是可以正常通讯的。