DMA interrupt

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

DMA interrupt

458 Views
xingyun
Contributor II

After setting up the DMA interrupt function, I found that I couldn't enter this interrupt. The inspection revealed that the channel INT remained at 0. There was a problem when the data at the original address was transmitted to the destination address, and no result was obtained. (PWM triggers ADC sampling)Could you please take a look at my program and tell me why it fails to enter the DMA interrupt?

void Dma0_IrqHandler(void)
{IP_TCD_0->CH7_INT = 1;}
0 Kudos
Reply
1 Reply

406 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @xingyun,

I cannot see your program, but in order to configure the DMA interrupt, make sure that DMA "Interrupt Callback" is declared, and the IntCtrl driver correctly configures the interrupt handler and priority:

DmaInterrupt.pngIntCtrl.png

Best regards,
Julián

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2326823%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDMA%20interrupt%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2326823%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EAfter%20setting%20up%20the%20DMA%20interrupt%20function%2C%20I%20found%20that%20I%20couldn't%20enter%20this%20interrupt.%20The%20inspection%20revealed%20that%20the%20channel%20INT%20remained%20at%200.%20There%20was%20a%20problem%20when%20the%20data%20at%20the%20original%20address%20was%20transmitted%20to%20the%20destination%20address%2C%20and%20no%20result%20was%20obtained.%20%EF%BC%88PWM%20triggers%20ADC%20sampling%EF%BC%89Could%20you%20please%20take%20a%20look%20at%20my%20program%20and%20tell%20me%20why%20it%20fails%20to%20enter%20the%20DMA%20interrupt%3F%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3Evoid%3C%2FSPAN%3E%20%3CSPAN%3EDma0_IrqHandler%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%3CSPAN%3EIP_TCD_0%3C%2FSPAN%3E%3CSPAN%3E-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3ECH7_INT%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E1%3C%2FSPAN%3E%3CSPAN%3E%3B%3C%2FSPAN%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2328061%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20DMA%20interrupt%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2328061%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%2F258092%22%20target%3D%22_blank%22%3E%40xingyun%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EI%20cannot%20see%20your%20program%2C%20but%20in%20order%20to%20configure%20the%20DMA%20interrupt%2C%20make%20sure%20that%20DMA%20%22Interrupt%20Callback%22%20is%20declared%2C%20and%20the%20IntCtrl%20driver%20correctly%20configures%20the%20interrupt%20handler%20and%20priority%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22DmaInterrupt.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22DmaInterrupt.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F378597iCFF85B2518C9CDD9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22DmaInterrupt.png%22%20alt%3D%22DmaInterrupt.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%22IntCtrl.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22IntCtrl.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F378596i38CB9BA20DD32455%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22IntCtrl.png%22%20alt%3D%22IntCtrl.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E