当HAL_DELAY设置高于90毫秒时
我正在研究STM32F04XX上的数据。当我以较低的速度从MCU传输数据时,看起来像鲍德拉特(Baudrate)是错误的,并且我得到了很多问号。当我增加传输速度时。我可以阅读要发送的数据。我曾经曾经使用STM32Cubeide生成一个简单的UART代码,并且仅
HAL_UART_Transmit(&huart2, "test\r\n", sizeof("test\r\n"), 1000);
HAL_Delay(500);
在while循环中添加。
在我的Nucleo-F042K6评估板上,我看不到在TTY端口上打印数据的任何问题。但是我还有另一个使用相同的STM32F042XX芯片的设备,该芯片仅在更高速度传输UART数据时起作用。因此,当我将延迟更改为80毫秒之类的东西时,我可以阅读数据流。
我试图闪烁与我拥有的另一个MCU评估板上闪烁的相同二进制文件,但仅以更高的传输速度可读数据。
我正在使用STM32Flash工具刷新MCU,因此我不知道在评估板上,我使用STM32Cubeide在闪烁它上闪烁。
我不确定这里发生了什么,我尝试了不同的鲍德拉底和不同的时钟配置,这似乎也无济于事。
是什么可能导致数据是无法读取的,例如在低速传输时Baudrate是错误的?
I'm working on transceiving data on stm32F04xx. When I transmit data from the MCU at lower speed, it looks like if the baudrate was wrong and I get a bunch of question marks. When I increate transmission speed. I can read the data I'm sending. I've used to stm32cubeIDE to generate a simple UART code and only added
HAL_UART_Transmit(&huart2, "test\r\n", sizeof("test\r\n"), 1000);
HAL_Delay(500);
in the while loop.
On my NUCLEO-F042K6 evaluation board, I don't see any issues printing data on the tty port. But I have another device which uses the same stm32f042xx chip that only works when transmitting UART data at higher speed. so when i change my delay to something like 80 milliseconds, I can read the data flow.
I've attempted to flash the same binary that I flashed on my evaluation board on the other MCU I have but again the data only readable at higher transmission speed.
I'm flashing the MCU with stm32flash tool so I don't know if that can make a difference where on the eval board, I'm using the stm32cubeIDE to flash it.
I'm not sure what's going on here, I've tried different baudrates and different clock configurations and that doesn't seem to help too.
What could possibly cause the data to be unreadable like if the baudrate was wrong when transmitting at low speed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论