S32K312 HSE strange problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K312 HSE strange problem

Jump to solution
3,137 Views
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

Tags (2)
0 Kudos
1 Solution
3,063 Views
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

View solution in original post

9 Replies
3,112 Views
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 Kudos
3,109 Views
zhengjianfei1
Contributor III

Hi Nam,

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

0 Kudos
3,090 Views
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 Kudos
3,087 Views
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 Kudos
3,064 Views
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

711 Views
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 Kudos
3,052 Views
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 Kudos
3,027 Views
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 Kudos
2,853 Views
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 Kudos