S32K358 multi core debug issue

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

S32K358 multi core debug issue

791 Views
nirmal_masilamani
Contributor IV

Hello Team,

Currently i am working with s32k358 custom board, i am facing hard fault issue when i try to debug both cores.

Controller resetting continuously.

I have attached my code. one core with FREE RTOS, another core without RTOS.

0 Kudos
Reply
12 Replies

756 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Controller resetting continuously.

Check the reason for resets. Read RGM FES and DES registers to see the reset sources.

petervlna_0-1767948771306.png

 

Best regards,

Peter

0 Kudos
Reply

750 Views
nirmal_masilamani
Contributor IV

Hello @petervlna ,

Thanks for the reply.

Due to continuous resetting its very difficult to debug.

My doubt is, 

Can i use core 0 without RTOS and Core 2 with Free RTOS?

To use CAN in core 2, do I need to anything specific in project setting | Linker file | any other XRDC register? Just normal CAN configuration is enough.

 

0 Kudos
Reply

592 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Due to continuous resetting its very difficult to debug.

Simply do hot attach with your debugger. This will stop code execution, so no SW reset will be triggered.

For example use Lauterbach debugger and do UP right after the power on reset.

Can i use core 0 without RTOS and Core 2 with Free RTOS?

Sure, there is no issue here. Make sure you share resources between cores correctly.

To use CAN in core 2, do I need to anything specific in project setting | Linker file | any other XRDC register? Just normal CAN configuration is enough.

It depends. If only core2 will access the peripheral, then you do not have to worry about conflicts.

Suggested steps:

  • Decide which FlexCAN instance Core2 will own (e.g., FlexCAN0).
  • In your Core0 init, set clocks and SIUL2 mux for the chosen CAN pins (or do it on Core2 if your boot model allows).
  • Configure XRDC: assign Core2’s domain and permit access to the FlexCAN instance (PAC) and any RAM you’ll use for CAN buffers (MRC).
  • In Core2 project, configure Can_43_FLEXCAN and IntCtrl_Ip so FlexCAN interrupts are enabled and handled on Core2.
  • Build & load two images (Core0 & Core2). Verify CAN RX/TX and interrupts on Core2.

Best regards,

Peter

0 Kudos
Reply

587 Views
nirmal_masilamani
Contributor IV

Hello @petervlna ,

Thanks for your inputs,

  • Configure XRDC: assign Core2’s domain and permit access to the FlexCAN instance (PAC) and any RAM you’ll use for CAN buffers (MRC).

Is there any example available or documents for XRDC configuration?

To use Free RTOS, in core 2, what's needs to done?

Tags (2)
0 Kudos
Reply

512 Views
nirmal_masilamani
Contributor IV

Hello Team,

I am trying use multi core in S32K358 in custom board.

I simply configured LED in Core 0 and UART in Core 2, But after some time, Controller restting ( Not fixed interval ).

Resetting reason from Power_Ip_GetResetReason -. Power on Reset.

I tried configuring XRDC for UART, but after RM init system goes to hard fault.

Tags (2)
0 Kudos
Reply

506 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Power_Ip_GetResetReason -. Power on Reset.

Hmm, this looks like you lost power to your uC.

Was there a reset performed by your SBC chip? Did you monitor HVD, LVD and reset line by oscilloscope to see if the voltages was OK when reset occurs?

Best regards,

Peter

0 Kudos
Reply

144 Views
nirmal_masilamani
Contributor IV

Hello @petervlna ,

Thanks for your reply.

I have monitored Reset Pin, for every reset-> reset pin drops to low.

Could you please share details for HVD and LVD pin details?

Another observation, resetting not happening if I program core 2 with empty while (1) loop.

Resetting happening only, if there some logic in core 2 (even with LED link).

Tags (2)
0 Kudos
Reply

29 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Could you please share details for HVD and LVD pin details?

petervlna_0-1768895465349.png

Check the schematic of your board to see where exactly is HV_A routed.

For your S32K3 device (e.g., S32K358 in your AEB project), the core voltage (V11) is generated internally using the high‑voltage input domain VDD_HV_A.

Another observation, resetting not happening if I program core 2 with empty while (1) loop.

Resetting happening only, if there some logic in core 2 (even with LED link).

That is a good point. Do you use NXP evalaution board?

If not, you power supply might not be strong enough to execute task on 2 cores and once second core draw higher current the LVDs will reset micro.

But I expect there will be some HW resource sharing issues which will lead to reset. For example not servicing the SWT for core2, etc...

Still best way is to look at FCCU NCFS registers for faults and RGM FES and DES for reset reasons.

Best regards,

Peter

0 Kudos
Reply

138 Views
nirmal_masilamani
Contributor IV

Hello @petervlna ,

One more observation, resetting happening only if clock is enabled.

If clock is not explicitly initialized in both cores, resetting not happening.

Is there anything I need to do with clock configuration for multi core?

Tags (2)
0 Kudos
Reply

28 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

You can check and try following example:


https://community.nxp.com/t5/S32K-Knowledge-Base/S32K358-Multicore-Start-CM7-2-from-CM7-0/ta-p/19238...

Best regards,

Peter

0 Kudos
Reply

21 Views
nirmal_masilamani
Contributor IV

Hello @petervlna ,

Thanks for the reply.

I used same example only, even in that example if i do clock_init() system resetting.

Tags (2)
0 Kudos
Reply

9 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

OK, thanks for clarification.

Changing the clock, will significantly increase the power consumption.

I expect you scenario is as follows.

You start second core, change the clocks and power source is not able to deliver required power in the time, therefore the LVDs ?(low voltage ddetectors) will trigger reset.

Micro starts and reset over and over after reset.

Measure you power source (SBC) along with reset line to see if the reset match the voltage drop on VDD_HV_A or on SBC.

Best regards,
Peter

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2290612%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290612%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Team%2C%3C%2FP%3E%3CP%3ECurrently%20i%20am%20working%20with%20s32k358%20custom%20board%2C%20i%20am%20facing%20hard%20fault%20issue%20when%20i%20try%20to%20debug%20both%20cores.%3C%2FP%3E%3CP%3EController%20resetting%20continuously.%3C%2FP%3E%3CP%3EI%20have%20attached%20my%20code.%20one%20core%20with%20FREE%20RTOS%2C%20another%20core%20without%20RTOS.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2290755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290755%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F13836%22%20target%3D%22_blank%22%3E%40petervlna%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThanks%20for%20the%20reply.%3C%2FP%3E%3CP%3EDue%20to%20continuous%20resetting%20its%20very%20difficult%20to%20debug.%3C%2FP%3E%3CP%3EMy%20doubt%20is%2C%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20i%20use%20core%200%20without%20RTOS%20and%20Core%202%20with%20Free%20RTOS%3F%3C%2FP%3E%3CP%3ETo%20use%20CAN%20in%20core%202%2C%20do%20I%20need%20to%20anything%20specific%20in%20project%20setting%20%7C%20Linker%20file%20%7C%20any%20other%20XRDC%20register%3F%20Just%20normal%20CAN%20configuration%20is%20enough.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2290738%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290738%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EController%20resetting%20continuously.%3C%2FP%3E%0A%3CP%3ECheck%20the%20reason%20for%20resets.%20Read%20RGM%20FES%20and%20DES%20registers%20to%20see%20the%20reset%20sources.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22petervlna_0-1767948771306.png%22%20style%3D%22width%3A%20681px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F372282i34FAB2262B16CB19%2Fimage-dimensions%2F681x177%3Fv%3Dv2%22%20width%3D%22681%22%20height%3D%22177%22%20role%3D%22button%22%20title%3D%22petervlna_0-1767948771306.png%22%20alt%3D%22petervlna_0-1767948771306.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291545%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291545%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3EDue%20to%20continuous%20resetting%20its%20very%20difficult%20to%20debug.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3ESimply%20do%20hot%20attach%20with%20your%20debugger.%20This%20will%20stop%20code%20execution%2C%20so%20no%20SW%20reset%20will%20be%20triggered.%3C%2FP%3E%0A%3CP%3EFor%20example%20use%20Lauterbach%20debugger%20and%20do%20UP%20right%20after%20the%20power%20on%20reset.%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3ECan%20i%20use%20core%200%20without%20RTOS%20and%20Core%202%20with%20Free%20RTOS%3F%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3ESure%2C%20there%20is%20no%20issue%20here.%20Make%20sure%20you%20share%20resources%20between%20cores%20correctly.%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3ETo%20use%20CAN%20in%20core%202%2C%20do%20I%20need%20to%20anything%20specific%20in%20project%20setting%20%7C%20Linker%20file%20%7C%20any%20other%20XRDC%20register%3F%20Just%20normal%20CAN%20configuration%20is%20enough.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EIt%20depends.%20If%20only%20core2%20will%20access%20the%20peripheral%2C%20then%20you%20do%20not%20have%20to%20worry%20about%20conflicts.%3C%2FP%3E%0A%3CP%3ESuggested%20steps%3A%3C%2FP%3E%0A%3CDIV%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2014px%3B%20font-style%3A%20normal%3B%20font-weight%3A%20400%3B%20line-height%3A%2020px%3B%22%3E%0A%3CUL%3E%0A%3CLI%3EDecide%20which%20FlexCAN%20instance%20Core2%20will%20own%20(e.g.%2C%20FlexCAN0).%3C%2FLI%3E%0A%3CLI%3EIn%20your%20Core0%20init%2C%20set%20clocks%20and%20SIUL2%20mux%20for%20the%20chosen%20CAN%20pins%20(or%20do%20it%20on%20Core2%20if%20your%20boot%20model%20allows).%3C%2FLI%3E%0A%3CLI%3EConfigure%20XRDC%3A%20assign%20Core2%E2%80%99s%20domain%20and%20permit%20access%20to%20the%20FlexCAN%20instance%20(PAC)%20and%20any%20RAM%20you%E2%80%99ll%20use%20for%20CAN%20buffers%20(MRC).%3C%2FLI%3E%0A%3CLI%3EIn%20Core2%20project%2C%20configure%20Can_43_FLEXCAN%20and%20IntCtrl_Ip%20so%20FlexCAN%20interrupts%20are%20enabled%20and%20handled%20on%20Core2.%3C%2FLI%3E%0A%3CLI%3EBuild%20%26amp%3B%20load%20two%20images%20(Core0%20%26amp%3B%20Core2).%20Verify%20CAN%20RX%2FTX%20and%20interrupts%20on%20Core2.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPeter%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291551%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291551%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F13836%22%20target%3D%22_blank%22%3E%40petervlna%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20inputs%2C%3C%2FP%3E%3CUL%3E%3CLI%3EConfigure%20XRDC%3A%20assign%20Core2%E2%80%99s%20domain%20and%20permit%20access%20to%20the%20FlexCAN%20instance%20(PAC)%20and%20any%20RAM%20you%E2%80%99ll%20use%20for%20CAN%20buffers%20(MRC).%3C%2FLI%3E%3C%2FUL%3E%3CP%3EIs%20there%20any%20example%20available%20or%20documents%20for%20XRDC%20configuration%3F%3C%2FP%3E%3CP%3ETo%20use%20Free%20RTOS%2C%20in%20core%202%2C%20what's%20needs%20to%20done%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2292590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2292590%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3E%3CSTRONG%3EPower_Ip_GetResetReason%26nbsp%3B%3C%2FSTRONG%3E-.%20Power%20on%20Reset.%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EHmm%2C%20this%20looks%20like%20you%20lost%20power%20to%20your%20uC.%3C%2FP%3E%0A%3CP%3EWas%20there%20a%20reset%20performed%20by%20your%20SBC%20chip%3F%20Did%20you%20monitor%20HVD%2C%20LVD%20and%20reset%20line%20by%20oscilloscope%20to%20see%20if%20the%20voltages%20was%20OK%20when%20reset%20occurs%3F%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPeter%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2292549%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2292549%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Team%2C%3C%2FP%3E%3CP%3EI%20am%20trying%20use%20multi%20core%20in%20S32K358%20in%20custom%20board.%3C%2FP%3E%3CP%3EI%20simply%20configured%20LED%20in%20Core%200%20and%20UART%20in%20Core%202%2C%20But%20after%20some%20time%2C%20Controller%20restting%20(%20Not%20fixed%20interval%20).%3C%2FP%3E%3CP%3EResetting%20reason%20from%3CSTRONG%3E%20Power_Ip_GetResetReason%26nbsp%3B%3C%2FSTRONG%3E-.%20Power%20on%20Reset.%3C%2FP%3E%3CP%3EI%20tried%20configuring%20XRDC%20for%20UART%2C%20but%20after%20RM%20init%20system%20goes%20to%20hard%20fault.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2295910%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2295910%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F13836%22%20target%3D%22_blank%22%3E%40petervlna%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply.%3C%2FP%3E%3CP%3EI%20have%20monitored%20Reset%20Pin%2C%20for%20every%20reset-%26gt%3B%20%3CSTRONG%3Ereset%20pin%20drops%20to%20low.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3ECould%20you%20please%20share%20details%20for%20HVD%20and%20LVD%20pin%20details%3F%3C%2FP%3E%3CP%3EAnother%20observation%2C%20resetting%20not%20happening%20if%20I%20program%20core%202%20with%20empty%20while%20(1)%20loop.%3C%2FP%3E%3CP%3E%3CSTRONG%3EResetting%20happening%20only%2C%20if%20there%20some%20logic%20in%20core%202%3C%2FSTRONG%3E%20(even%20with%20LED%20link).%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2295989%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K358%20multi%20core%20debug%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2295989%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F13836%22%20target%3D%22_blank%22%3E%40petervlna%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EOne%20more%20observation%2C%20resetting%20happening%20only%20if%20clock%20is%20enabled.%3C%2FP%3E%3CP%3E%3CSTRONG%3EIf%20clock%20is%20not%20explicitly%20initialized%20in%20both%20cores%2C%20resetting%20not%20happening.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIs%20there%20anything%20I%20need%20to%20do%20with%20clock%20configuration%20for%20multi%20core%3F%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E