DMA interrupt not triggering on S32K324

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

DMA interrupt not triggering on S32K324

1,001 Views
ilx123
Contributor II

Hi everyone,

I have configured the eMIOS ICU to use DMA. But for some reason, the DMA completion notification is never entered. 

emios icu config:

ilx123_3-1755611677414.png

ilx123_4-1755611706420.pngilx123_5-1755611720999.png

 

Rm dmamux:

ilx123_1-1755610961232.png

IntCtrl:

ilx123_2-1755610983202.png

And in the code:

extern void IcuChannel_3_DmaTransferCompletionNotif(void)
{
    Emios_Icu_Ip_TimestampDmaProcessing(1u, 1u);
}

 

As to my understanding, the following should happen: edge gets detected by the ICU -> triggers DMA transfer -> IcuChannel_3_DmaTransferCompletionNotif() -> Emios_Icu_Ip_TimestampDmaProcessing() gets called -> timestamp measurement notification (SENT_INPUT1_ISR gets called). This is also the desired flow for the application I am creating. 

Could it be that I misunderstood something inside the configuration of the drivers? Any help would be appreciated.

 

0 Kudos
Reply
2 Replies

933 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @ilx123 

I recently posted a simple example code that shows how to configure eMIOS in ICU_MODE_TIMESTAMP using SAIC (Single Action Input Capture) mode with DMA. In this setup, one eMIOS channel captures timestamps from a waveform generated by another channel. After a predefined number of captures, a DMA interrupt is triggered.

Example S32K344 eMIOS Icu with DMA DS3.6 RTD 6.0.0

 

BR, VaneB

0 Kudos
Reply

706 Views
ilx123
Contributor II

Hi @VaneB , this example works for S32K344, and I can see that interrupts are happening. However, when trying to run this on S32K324 after creating a new project with the same code and configuration, it does not work. Is there anything else I need to enable for S32K324? Does S32K344 being in lockstep mode cause any crucial differences in DMA functionality or limit posibilites? I am using RTD4.0.0. 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2154468%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDMA%20interrupt%20not%20triggering%20on%20S32K324%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2154468%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20everyone%2C%3C%2FP%3E%3CP%3EI%20have%20configured%20the%20eMIOS%20ICU%20to%20use%20DMA.%20But%20for%20some%20reason%2C%20the%20DMA%20completion%20notification%20is%20never%20entered.%26nbsp%3B%3C%2FP%3E%3CP%3Eemios%20icu%20config%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ilx123_3-1755611677414.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ilx123_3-1755611677414.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353036i70E200006CF4CB41%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ilx123_3-1755611677414.png%22%20alt%3D%22ilx123_3-1755611677414.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%22ilx123_4-1755611706420.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ilx123_4-1755611706420.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353037iD7118A2BF75E2B93%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ilx123_4-1755611706420.png%22%20alt%3D%22ilx123_4-1755611706420.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ilx123_5-1755611720999.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ilx123_5-1755611720999.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353038iF6E5A3C6838D03B2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ilx123_5-1755611720999.png%22%20alt%3D%22ilx123_5-1755611720999.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ERm%20dmamux%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ilx123_1-1755610961232.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ilx123_1-1755610961232.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353033iA274544E048C2D4F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ilx123_1-1755610961232.png%22%20alt%3D%22ilx123_1-1755610961232.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIntCtrl%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ilx123_2-1755610983202.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ilx123_2-1755610983202.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353034i161353873F02A4A8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ilx123_2-1755610983202.png%22%20alt%3D%22ilx123_2-1755610983202.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EAnd%20in%20the%20code%3A%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3Eextern%3C%2FSPAN%3E%20%3CSPAN%3Evoid%3C%2FSPAN%3E%20%3CSPAN%3EIcuChannel_3_DmaTransferCompletionNotif%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3Evoid%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%3C%2FSPAN%3E%3CSPAN%3EEmios_Icu_Ip_TimestampDmaProcessing%3C%2FSPAN%3E%3CSPAN%3E(1u%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%26nbsp%3B1u%3CSPAN%3E)%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CP%3EAs%20to%20my%20understanding%2C%20the%20following%20should%20happen%3A%20edge%20gets%20detected%20by%20the%20ICU%20-%26gt%3B%20triggers%20DMA%20transfer%20-%26gt%3B%20IcuChannel_3_DmaTransferCompletionNotif()%20-%26gt%3B%26nbsp%3B%3CSPAN%3EEmios_Icu_Ip_TimestampDmaProcessing()%20gets%20called%20-%26gt%3B%20timestamp%20measurement%20notification%20(SENT_INPUT1_ISR%20gets%20called).%20This%20is%20also%20the%20desired%20flow%20for%20the%20application%20I%20am%20creating.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ECould%20it%20be%20that%20I%20misunderstood%20something%20inside%20the%20configuration%20of%20the%20drivers%3F%20Any%20help%20would%20be%20appreciated.%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2181871%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20DMA%20interrupt%20not%20triggering%20on%20S32K324%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2181871%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%2F201913%22%20target%3D%22_blank%22%3E%40VaneB%3C%2FA%3E%26nbsp%3B%2C%20this%20example%20works%20for%20S32K344%2C%20and%20I%20can%20see%20that%20interrupts%20are%20happening.%20However%2C%20when%20trying%20to%20run%20this%20on%20S32K324%20after%20creating%20a%20new%20project%20with%20the%20same%20code%20and%20configuration%2C%20it%20does%20not%20work.%20Is%20there%20anything%20else%20I%20need%20to%20enable%20for%20S32K324%3F%20Does%20S32K344%20being%20in%20lockstep%20mode%20cause%20any%20crucial%20differences%20in%20DMA%20functionality%20or%20limit%20posibilites%3F%20I%20am%20using%20RTD4.0.0.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2156234%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20DMA%20interrupt%20not%20triggering%20on%20S32K324%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2156234%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%2F247038%22%20target%3D%22_blank%22%3E%40ilx123%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20recently%20posted%20a%20simple%20example%20code%20that%20shows%20how%20to%20configure%20eMIOS%20in%20ICU_MODE_TIMESTAMP%20using%20SAIC%20(Single%20Action%20Input%20Capture)%20mode%20with%20DMA.%20In%20this%20setup%2C%20one%20eMIOS%20channel%20captures%20timestamps%20from%20a%20waveform%20generated%20by%20another%20channel.%20After%20a%20predefined%20number%20of%20captures%2C%20a%20DMA%20interrupt%20is%20triggered.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-eMIOS-Icu-with-DMA-DS3-6-RTD-6-0-0%2Fta-p%2F2156223%22%20target%3D%22_blank%22%3EExample%20S32K344%20eMIOS%20Icu%20with%20DMA%20DS3.6%20RTD%206.0.0%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%2C%20VaneB%3C%2FP%3E%3C%2FLINGO-BODY%3E