Issue with LPUART3 on S32K344: Junk bytes after increasing core clock frequency

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

Issue with LPUART3 on S32K344: Junk bytes after increasing core clock frequency

跳至解决方案
8,895 次查看
Uday156
Contributor I

I am writing to seek assistance with a problem I am encountering when using the LPUART3 module on the S32K344 microcontroller. Specifically, I am experiencing issues with junk bytes being received after increasing the core clock frequency from 48MHz to 160MHz.

To provide some context, I have observed that the LPUART transmission and reception function flawlessly when the core clock frequency is set to 48MHz. However, after changing the clock frequency to 160MHz, I am encountering unexpected junk bytes during the data reception process.

I have attached a snippet of the clock tree and the reference points that I am using for your reference. I have included the code base that I am using for my testing as well.

Thank you in advance for your time and support. I look forward to any suggestions, ideas, or solutions that the NXP Community can provide.

0 项奖励
回复
1 解答
8,829 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

You forget initialize and activate the PLL clock in main function. Please add below codes:

Mcu_InitClock(McuClockSettingConfig_0);
while ( MCU_PLL_LOCKED != Mcu_GetPllStatus() )
{
/* Busy wait until the System PLL is locked */
}
Mcu_DistributePllClock();

在原帖中查看解决方案

4 回复数
8,700 次查看
Uday156
Contributor I

@Robin_Shen Thank you the solution worked, sorry for late response.

0 项奖励
回复
8,874 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi  

Uart_Example_S32K344_LPUART3_junk_bytes.zip did not configure 160MHz CORE_CLK in S32CT, would you please reconfigure it and click Update Code. And then select 40MHz AIPS_SLOW_CLK for LPUART3_CLK?

Mcu Clock Frequency Select AIPS_SLOW_CLK LPUART3.png

It is recommended to use an oscilloscope or logic analyzer to measure the actual baud rate of LPUART3.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复
8,866 次查看
Uday156
Contributor I

I appreciate your prompt response, I would like to inform you that I have successfully configured the clock frequency to 160MHz, as evidenced by the attached snippet of the clock tree image. Despite this configuration, however, I am encountering an issue with receiving junk bytes during UART communication.

Considering the above, I wanted to inquire if there are any additional areas within the S32CT software or project that require configuration to address this problem. I have reviewed the clock settings and ensured that the frequency is correctly set to 160MHz. However, it seems that there might be other settings or parameters related to UART communication that need adjustment.

To effectively troubleshoot and resolve the issue, I kindly request your guidance on any other configurations or settings that should be considered in S32CT.

Uday156_0-1689231763626.png

 

0 项奖励
回复
8,830 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

You forget initialize and activate the PLL clock in main function. Please add below codes:

Mcu_InitClock(McuClockSettingConfig_0);
while ( MCU_PLL_LOCKED != Mcu_GetPllStatus() )
{
/* Busy wait until the System PLL is locked */
}
Mcu_DistributePllClock();