Update on S32K388 BIST issue: Soft reset causing peripheral init failure in App

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

Update on S32K388 BIST issue: Soft reset causing peripheral init failure in App

58 Views
HazemIhab
Contributor I

Hi NXP Support Team,

Following up on the previous BIST hard reset issue: we applied your proposed change, and the BIST now successfully performs a soft reset instead.

To adapt to this soft reset and avoid double MCU clock initialization, we initially kept the MCU clock initialization in the Application. However, after the BIST soft reset and jumping to the App, the clock re-initialization was taking an unusually long time. We suspect this delay and lock-up occurred because the clocks were already initialized by the Boot Manager, causing conflicts during the second attempt.

To resolve that extreme delay, we removed the MCU clock initialization from the Application entirely, leaving it exclusively in the Boot Manager. Unfortunately, this has introduced a new issue: after jumping to the Application, the system now hangs during peripheral initialization (specifically FlexCAN), which points back to a clock availability issue.

Could you advise on the correct clock configuration strategy here? Specifically, does the BIST soft reset disrupt the clocks initialized by the BM in a way that requires re-initialization in the App, and how can we properly hand off the clocks between the BM and App without causing lockups or extreme delays?

Tags (1)
0 Kudos
Reply
1 Reply

21 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @HazemIhab,

I haven't found your previous BIST hard reset issue in any support ticket or community thread.

I understand you see ST_DONE functional reset.

After the reset the clock configuration is reset, so it needs to be initialized.

If you use the RTD drivers, the Clock_Ip_InitClock() function resets all the clocks to a safe state first — which is probably the delay you see if you initialize the clocks in both the Boot Manager and the application.

It can be configured in the Boot Manager only, but you need to make sure the driver enables all the clocks the application needs — in this case the FlexCAN clock.

Also, all the system clocks must match one of the clock options listed in the RM, e.g. Table 156. Option A - High Performance mode (CM7_CORE_CLK @ 160 MHz) (For S32K388/S32K389).

 

BR, Daniel

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2399160%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUpdate%20on%20S32K388%20BIST%20issue%3A%20Soft%20reset%20causing%20peripheral%20init%20failure%20in%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399160%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20NXP%20Support%20Team%2C%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EFollowing%20up%20on%20the%20previous%20BIST%20hard%20reset%20issue%3A%20we%20applied%20your%20proposed%20change%2C%20and%20the%20BIST%20now%20successfully%20performs%20a%20soft%20reset%20instead.%3C%2FP%3E%3CP%3ETo%20adapt%20to%20this%20soft%20reset%20and%20avoid%20double%20MCU%20clock%20initialization%2C%20we%20initially%20kept%20the%20MCU%20clock%20initialization%20in%20the%20Application.%20However%2C%20after%20the%20BIST%20soft%20reset%20and%20jumping%20to%20the%20App%2C%20the%20clock%20re-initialization%20was%20taking%20an%20unusually%20long%20time.%20We%20suspect%20this%20delay%20and%20lock-up%20occurred%20because%20the%20clocks%20were%20already%20initialized%20by%20the%20Boot%20Manager%2C%20causing%20conflicts%20during%20the%20second%20attempt.%3CBR%20%2F%3E%3CBR%20%2F%3ETo%20resolve%20that%20extreme%20delay%2C%20we%20removed%20the%20MCU%20clock%20initialization%20from%20the%20Application%20entirely%2C%20leaving%20it%20exclusively%20in%20the%20Boot%20Manager.%20Unfortunately%2C%20this%20has%20introduced%20a%20new%20issue%3A%20after%20jumping%20to%20the%20Application%2C%20the%20system%20now%20hangs%20during%20peripheral%20initialization%20(specifically%20FlexCAN)%2C%20which%20points%20back%20to%20a%20clock%20availability%20issue.%3CBR%20%2F%3E%3CBR%20%2F%3ECould%20you%20advise%20on%20the%20correct%20clock%20configuration%20strategy%20here%3F%20Specifically%2C%20does%20the%20BIST%20soft%20reset%20disrupt%20the%20clocks%20initialized%20by%20the%20BM%20in%20a%20way%20that%20requires%20re-initialization%20in%20the%20App%2C%20and%20how%20can%20we%20properly%20hand%20off%20the%20clocks%20between%20the%20BM%20and%20App%20without%20causing%20lockups%20or%20extreme%20delays%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2399452%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Update%20on%20S32K388%20BIST%20issue%3A%20Soft%20reset%20causing%20peripheral%20init%20failure%20in%20App%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2399452%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233178%22%20target%3D%22_blank%22%3E%40HazemIhab%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20haven't%20found%20your%20previous%20BIST%20hard%20reset%20issue%20in%20any%20support%20ticket%20or%20community%20thread.%3C%2FP%3E%0A%3CP%3EI%20understand%20you%20see%20ST_DONE%20functional%20reset.%3C%2FP%3E%0A%3CP%3EAfter%20the%20reset%20the%20clock%20configuration%20is%20reset%2C%20so%20it%20needs%20to%20be%20initialized.%3C%2FP%3E%0A%3CP%3EIf%20you%20use%20the%20RTD%20drivers%2C%20the%20Clock_Ip_InitClock()%20function%20resets%20all%20the%20clocks%20to%20a%20safe%20state%20first%20%E2%80%94%20which%20is%20probably%20the%20delay%20you%20see%20if%20you%20initialize%20the%20clocks%20in%20both%20the%20Boot%20Manager%20and%20the%20application.%3C%2FP%3E%0A%3CP%3EIt%20can%20be%20configured%20in%20the%20Boot%20Manager%20only%2C%20but%20you%20need%20to%20make%20sure%20the%20driver%20enables%20all%20the%20clocks%20the%20application%20needs%20%E2%80%94%20in%20this%20case%20the%20FlexCAN%20clock.%3C%2FP%3E%0A%3CP%3EAlso%2C%20all%20the%20system%20clocks%20must%20match%20one%20of%20the%20clock%20options%20listed%20in%20the%20RM%2C%20e.g.%20Table%20156.%20Option%20A%20-%20High%20Performance%20mode%20(CM7_CORE_CLK%20%40%20160%20MHz)%20(For%20S32K388%2FS32K389).%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%2C%20Daniel%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E