S32K312 HSE strange problem

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

S32K312 HSE strange problem

跳至解决方案
3,206 次查看
zhengjianfei1
Contributor III

Hello Nxp, 

Recently I am debug with S32K312 HSE functions. Functions seem all ok at first,AB Swap function is test ok,HASH is ok.  But when i add some other functions like uart printf function into my project, HSE became not good.  Code will block when i use GetAttr to get HSE version. it seems like HSE did not work at all. This problem can not be resolved by reprograming or update HSE Firmware because you can not update HSE while HSE not work. I have met this problem twice,every time meeting this problem,what you can do is noly replace S32K312 MCU. Could someone tell me how this problem happen and how to recover? Thanks a lot!

ps:HSE version is 1.13.0.2.1.0. S32K312 MASK: PS32K312NHVPBST  0P09C   CTZM2132A

标记 (2)
0 项奖励
1 解答
3,132 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello @zhengjianfei1 ,

Sorry for late reply. I'm not sure how the HSE firmware is corrupted, but I do know about how to recover the HSE firmware. Please see attachment. 

You need to prepare a S32DS project to download HSE FW pink image to flash, then just do as the doc shows.

It should be noted that the proper operation of HSE depends on other clock sources, so it is best to follow the recommended configuration in the S32K3 RM and HSE RM.

namnguyenviet_0-1669193421484.png

Best Regards,

Nam

在原帖中查看解决方案

9 回复数
3,181 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello,

We are not aware of this issue. How does the "printf" function work in your application? Does it simply connect to a UART peripheral? The HSE firmware shall not be affected of any of those operations. If possible, please share me your project so that I can verify it.

Best Regards,

Nam

0 项奖励
3,178 次查看
zhengjianfei1
Contributor III

Hi Nam,

Thanks for your reply. "Printf" function uses uart6 Lpuart_Uart_Ip_SyncSend function.  Attach is my project.

0 项奖励
3,159 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello @zhengjianfei1 ,

I verified your app. Unfortunately I couldn't reproduce it: After some attempts to reset the board, I still could be able to observe the Hse_Fwversion value:

namnguyenviet_0-1668164423839.png

Not sure what could be the reason to your issue.

Best Regards,

Nam

0 项奖励
3,156 次查看
zhengjianfei1
Contributor III

Hi Nam,

Thanks!My code will swap A B Periodically. It works well at first. I am just wondering how this issue happened. Maybe it appears while power-off and power-on,or it appears while downloading. For this issue,there is no way to recover except replace a new IC. So i am looking for NXP help to avoid this issue.

0 项奖励
3,133 次查看
namnguyenviet
NXP Employee
NXP Employee

Hello @zhengjianfei1 ,

Sorry for late reply. I'm not sure how the HSE firmware is corrupted, but I do know about how to recover the HSE firmware. Please see attachment. 

You need to prepare a S32DS project to download HSE FW pink image to flash, then just do as the doc shows.

It should be noted that the proper operation of HSE depends on other clock sources, so it is best to follow the recommended configuration in the S32K3 RM and HSE RM.

namnguyenviet_0-1669193421484.png

Best Regards,

Nam

780 次查看
zhengjianfei1
Contributor III

Hi @namnguyenviet 

How do you do? As As described in your previous documentation,S32K312 need change to optionB clock, and we cannot clear POR, and we cannot enable PLL_ENABLE in IVT.  Have these problems been solved in new HSE FW? Thanks!

zhengjianfei1_0-1702954332490.png

 

 

0 项奖励
3,121 次查看
zhengjianfei1
Contributor III

Hi Nam,

Thanks. Finally I found this problem is  caused by function Power_Ip_GetResetReason(). When calling Power_Ip_GetResetReason() in your code,HSE will not work while next reset except power on reset. And Thanks to your method,we can recover it by reinstall HSE using MU interface.

0 项奖励
3,096 次查看
luhaiou_autolink
Contributor I

Hi,zhengjianfei1:

Recently I was also debugging the AB swap feature. Your code inspired me a lot.

You mentioned:

"When calling Power_Ip_GetResetReason() in your code,HSE will not work while next reset except power on reset"

I I was confused,why calling calling Power_Ip_GetResetReason() result in HSE FW corrupted. Can you help explain in detail.

Thank you very much.

0 项奖励
2,922 次查看
zhengjianfei1
Contributor III

Hi luhaiou,

I am sorry I dont know the reason either. Just know we cannot Clear the reset flags from MC_RGM_DES , especially F_POR bit.

0 项奖励