There is a microsecond level delay when capturing the input signal of S32K142W chip

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

There is a microsecond level delay when capturing the input signal of S32K142W chip

525 Views
FAR1234
Contributor III

Dear NXP experts,

Background of the problem:
MCU: S32K142W;
Application background: Configure FTM2 as capture mode to capture three-phase Hall signals for BLDC motor control.
Problem description: Adding an instruction to reverse GPIO at the input of the FTM2_Ch0uCh1_IRQHandler() interrupt function, it was found that the capture trigger time can be delayed by up to 3.2us compared to the captured signal. As shown in the following figure:

FAR1234_0-1758591800978.png

CH1 channel (yellow waveform): FTM2 captures interrupt reversal IO port;
CH2 channel (blue waveform): periodic square wave generated by the signal generator;

My FTM2 configuration is as follows:
Configure reference information, refer to this image:

FAR1234_1-1758592041830.png

Specific configuration information of FTM2:

FAR1234_2-1758592108532.png

FAR1234_3-1758592141480.png

Looking forward to your reply, thank you.

LF

0 Kudos
Reply
3 Replies

493 Views
_Leo_
NXP TechSupport
NXP TechSupport

Thank you for your interest in our products and for contributing to our community.

Maybe the CPU is attending another interrupt, set priority according to your needs:

_Leo__0-1758652929514.png

We hope this resolves your issue.

0 Kudos
Reply

479 Views
FAR1234
Contributor III

Hi @_Leo_ 

I am glad to receive your reply.

I only set the interrupt priority of "FTM2_Ch0_Ch1_IRQHandler" to the highest priority 0, and tested again, the fault still persists. As shown in the following figure:The maximum delay time reaches 3.115us

FAR1234_0-1758676563751.png

CH1 channel (yellow waveform): FTM2 captures interrupt reversal IO port;
CH2 channel (blue waveform): periodic square wave generated by the signal generator;

According to my configuration, can you retest it on your end to see if it is normal?

 

Best regards

LF

0 Kudos
Reply

391 Views
FAR1234
Contributor III

Hi @_Leo_ 

Have you made any progress on this issue?
We look forward to your reply.

Best regards

LF

Tags (1)
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2173871%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EThere%20is%20a%20microsecond%20level%20delay%20when%20capturing%20the%20input%20signal%20of%20S32K142W%20chip%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173871%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EDear%20NXP%20experts%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3EBackground%20of%20the%20problem%3A%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3EMCU%3A%3C%2FSTRONG%3E%20S32K142W%3B%3CBR%20%2F%3E%3CSTRONG%3EApplication%20background%3A%3C%2FSTRONG%3E%20Configure%20FTM2%20as%20capture%20mode%20to%20capture%20three-phase%20Hall%20signals%20for%20BLDC%20motor%20control.%3CBR%20%2F%3E%3CSTRONG%3EProblem%20description%3A%3C%2FSTRONG%3E%20Adding%20an%20instruction%20to%20reverse%20GPIO%20at%20the%20input%20of%20the%20%3CSTRONG%3EFTM2_Ch0uCh1_IRQHandler()%26nbsp%3B%3C%2FSTRONG%3Einterrupt%20function%2C%20it%20was%20found%20that%20the%20capture%20trigger%20time%20can%20be%20delayed%20by%20up%20to%203.2us%20compared%20to%20the%20captured%20signal.%20As%20shown%20in%20the%20following%20figure%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FAR1234_0-1758591800978.png%22%20style%3D%22width%3A%20790px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22FAR1234_0-1758591800978.png%22%20style%3D%22width%3A%20790px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358045i4A01CE46EAB67663%2Fimage-dimensions%2F790x409%3Fv%3Dv2%22%20width%3D%22790%22%20height%3D%22409%22%20role%3D%22button%22%20title%3D%22FAR1234_0-1758591800978.png%22%20alt%3D%22FAR1234_0-1758591800978.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECH1%20channel%20(yellow%20waveform)%3C%2FSTRONG%3E%3A%20FTM2%20captures%20interrupt%20reversal%20IO%20port%3B%3CBR%20%2F%3E%3CSTRONG%3ECH2%20channel%20(blue%20waveform)%3C%2FSTRONG%3E%3A%20periodic%20square%20wave%20generated%20by%20the%20signal%20generator%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EMy%20FTM2%20configuration%20is%20as%20follows%3C%2FSTRONG%3E%3A%3CBR%20%2F%3EConfigure%20reference%20information%2C%20refer%20to%20this%20image%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FAR1234_1-1758592041830.png%22%20style%3D%22width%3A%20610px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22FAR1234_1-1758592041830.png%22%20style%3D%22width%3A%20610px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358046iCFE7E71A8D096D71%2Fimage-dimensions%2F610x371%3Fv%3Dv2%22%20width%3D%22610%22%20height%3D%22371%22%20role%3D%22button%22%20title%3D%22FAR1234_1-1758592041830.png%22%20alt%3D%22FAR1234_1-1758592041830.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESpecific%20configuration%20information%20of%20FTM2%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FAR1234_2-1758592108532.png%22%20style%3D%22width%3A%20756px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22FAR1234_2-1758592108532.png%22%20style%3D%22width%3A%20756px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358047i278AFEFC1C51A316%2Fimage-dimensions%2F756x272%3Fv%3Dv2%22%20width%3D%22756%22%20height%3D%22272%22%20role%3D%22button%22%20title%3D%22FAR1234_2-1758592108532.png%22%20alt%3D%22FAR1234_2-1758592108532.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FAR1234_3-1758592141480.png%22%20style%3D%22width%3A%20765px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22FAR1234_3-1758592141480.png%22%20style%3D%22width%3A%20765px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358048i28CE2FA0DC8D5250%2Fimage-dimensions%2F765x426%3Fv%3Dv2%22%20width%3D%22765%22%20height%3D%22426%22%20role%3D%22button%22%20title%3D%22FAR1234_3-1758592141480.png%22%20alt%3D%22FAR1234_3-1758592141480.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ELooking%20forward%20to%20your%20reply%2C%20thank%20you.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ELF%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2177948%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20There%20is%20a%20microsecond%20level%20delay%20when%20capturing%20the%20input%20signal%20of%20S32K142W%20chip%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2177948%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%2F199320%22%20target%3D%22_blank%22%3E%40_Leo_%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20you%20made%20any%20progress%20on%20this%20issue%3F%3CBR%20%2F%3EWe%20look%20forward%20to%20your%20reply.%3C%2FP%3E%3CP%3EBest%20regards%3C%2FP%3E%3CP%3ELF%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174620%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20There%20is%20a%20microsecond%20level%20delay%20when%20capturing%20the%20input%20signal%20of%20S32K142W%20chip%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174620%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%2F199320%22%20target%3D%22_blank%22%3E%40_Leo_%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20glad%20to%20receive%20your%20reply.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20only%20set%20the%20interrupt%20priority%20of%20%22%3CSTRONG%3EFTM2_Ch0_Ch1_IRQHandler%3C%2FSTRONG%3E%22%20to%20the%20highest%20priority%200%2C%20and%20tested%20again%2C%20the%20fault%20still%20persists.%20As%20shown%20in%20the%20following%20figure%3A%3CU%3E%3CSTRONG%3EThe%20maximum%20delay%20time%20reaches%203.115us%3C%2FSTRONG%3E%3C%2FU%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22FAR1234_0-1758676563751.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22FAR1234_0-1758676563751.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358229iD443FE556FAC85A5%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22FAR1234_0-1758676563751.png%22%20alt%3D%22FAR1234_0-1758676563751.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ECH1%20channel%20(yellow%20waveform)%3C%2FSTRONG%3E%3CSPAN%3E%3A%20FTM2%20captures%20interrupt%20reversal%20IO%20port%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSTRONG%3ECH2%20channel%20(blue%20waveform)%3C%2FSTRONG%3E%3CSPAN%3E%3A%20periodic%20square%20wave%20generated%20by%20the%20signal%20generator%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EAccording%20to%20my%20configuration%2C%20can%20you%20retest%20it%20on%20your%20end%20to%20see%20if%20it%20is%20normal%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%3EBest%20regards%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ELF%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2174506%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20There%20is%20a%20microsecond%20level%20delay%20when%20capturing%20the%20input%20signal%20of%20S32K142W%20chip%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174506%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20your%20interest%20in%20our%20products%20and%20for%20contributing%20to%20our%20community.%3C%2FP%3E%0A%3CP%3EMaybe%20the%20CPU%20is%20attending%20another%20interrupt%2C%20set%20priority%20according%20to%20your%20needs%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22_Leo__0-1758652929514.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22_Leo__0-1758652929514.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F358206i2A667CAF9D6B10C5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22_Leo__0-1758652929514.png%22%20alt%3D%22_Leo__0-1758652929514.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWe%20hope%20this%20resolves%20your%20issue.%3C%2FP%3E%3C%2FLINGO-BODY%3E