UART Communication clock

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

UART Communication clock

跳至解决方案
894 次查看
AchrafOukheir
Contributor III

Hello NXP Community,

I hope this message finds you well. I am currently working with the RD-HVBMSCTBUN board and I'm facing some difficulties with UART communication. As we are working on new projects from scratch, we have been referring to examples for guidance, but we haven't had much success so far.

After posting several questions and searching for information online, we were finally able to send data using UART and see the output on Putty. However, we now want to incorporate an operating system (FreeRTOS) into our project. Here's where we encountered a problem.

AchrafOukheir_0-1715179567207.png

 

The UART example provided uses a clock frequency of 48MHz and FIRC, but most FreeRTOS usecases and other resources suggest using a clock frequency of 160MHz and the PLL. So ,when we changed the clock to 160MHz, we started receiving bizarre characters instead of the expected data.

AchrafOukheir_1-1715179726476.png


I'm not sure why the UART + FreeRTOS is not working or how to correctly change the UART clock to support 160MHz. I have attempted it myself, but unfortunately, it didn't work (of course we use slow-clock as we are using LPUART1).

If anyone in the community has any insights into what might be going wrong or possible solutions to this issue, I would greatly appreciate your help. Your expertise and guidance would be invaluable to us in resolving this problem and continuing our project smoothly.

Thank you all in advance for your time and assistance.

标记 (3)
0 项奖励
回复
1 解答
805 次查看
AchrafOukheir
Contributor III

My solutions is : Switch to the PLL clock, enable it in peripherals, and ensure that the PLL is locked. FreeRTOS relies on the PLL clock for proper operation.

AchrafOukheir_0-1715884915352.png

AchrafOukheir_1-1715884959877.pngAchrafOukheir_2-1715885047107.pngAchrafOukheir_3-1715885063487.png

 

 

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
837 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

does a demo example run properly if not using FreeRTOS, just after updating clock option?
Try to measure TXD data to see what bitrate is really set. Maybe you can try to measure AIPS_SLOW_CLK on CLKOUT0_RUN pin.

BR, Petr

0 项奖励
回复
806 次查看
AchrafOukheir
Contributor III

My solutions is : Switch to the PLL clock, enable it in peripherals, and ensure that the PLL is locked. FreeRTOS relies on the PLL clock for proper operation.

AchrafOukheir_0-1715884915352.png

AchrafOukheir_1-1715884959877.pngAchrafOukheir_2-1715885047107.pngAchrafOukheir_3-1715885063487.png

 

 

 

0 项奖励
回复