i.mx93 LPSPI + eDMA problem on Cortex-M33

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

i.mx93 LPSPI + eDMA problem on Cortex-M33

Jump to solution
1,407 Views
albi84
Contributor II

I’m using a Tria i.MX9332 (B1 silicon) SMARC module and trying to use LPSPI6 with eDMA on the Cortex-M33, but I can’t get it working.

Development environment

  • VS Code 1.109.0

  • MCUXpresso for VS Code extension 26.1.56

  • SDK 25.09.00

Hardware

  • Tria SM2S-IMX93 on a custom carrier board

  • LCD with ILI9341 controller connected via SPI (LPSPI6)

Current status

  • The display works correctly when using LPSPI6 without DMA.

  • I’m trying to switch to LPSPI6 + eDMA to improve throughput, but I cannot get completion notification.

Issue
The DMA-based transfer appears to start, but I never receive the LPSPI DMA completion callback at the end of the transfer.

Details and relevant code/config are in the attached file.
Could someone point out what I might be missing, or why the callback is not triggered?

0 Kudos
Reply
1 Solution
1,347 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @albi84 

Please refer the attachment patch file configuration the LPDPI with EDMA

B.R

View solution in original post

0 Kudos
Reply
4 Replies
1,348 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @albi84 

Please refer the attachment patch file configuration the LPDPI with EDMA

B.R

0 Kudos
Reply
1,326 Views
albi84
Contributor II

Thank you for the sample code. Reviewing the example helped me to make it work.

0 Kudos
Reply
1,148 Views
rti
Contributor II

Hello,

 

Can you please share the skeleton for the LPSPI with eDMA?

 

Thanks.

0 Kudos
Reply
1,012 Views
albi84
Contributor II

It is not a skeleton but the actual code I use. Does this help?

%3CLINGO-SUB%20id%3D%22lingo-sub-2314206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.mx93%20LPSPI%20%2B%20eDMA%20problem%20on%20Cortex-M33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2314206%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%E2%80%99m%20using%20a%20%3CSTRONG%3ETria%20i.MX9332%20(B1%20silicon)%20SMARC%20module%3C%2FSTRONG%3E%20and%20trying%20to%20use%20%3CSTRONG%3ELPSPI6%20with%20eDMA%20on%20the%20Cortex-M33%3C%2FSTRONG%3E%2C%20but%20I%20can%E2%80%99t%20get%20it%20working.%3C%2FP%3E%3CP%3E%3CSTRONG%3EDevelopment%20environment%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EVS%20Code%201.109.0%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EMCUXpresso%20for%20VS%20Code%20extension%2026.1.56%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ESDK%2025.09.00%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3EHardware%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3ETria%20SM2S-IMX93%20on%20a%20custom%20carrier%20board%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ELCD%20with%20%3CSTRONG%3EILI9341%3C%2FSTRONG%3E%20controller%20connected%20via%20SPI%20(LPSPI6)%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3ECurrent%20status%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EThe%20display%20works%20correctly%20when%20using%20%3CSTRONG%3ELPSPI6%20without%20DMA%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EI%E2%80%99m%20trying%20to%20switch%20to%20%3CSTRONG%3ELPSPI6%20%2B%20eDMA%3C%2FSTRONG%3E%20to%20improve%20throughput%2C%20but%20I%20cannot%20get%20completion%20notification.%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3EIssue%3C%2FSTRONG%3E%3CBR%20%2F%3EThe%20DMA-based%20transfer%20appears%20to%20start%2C%20but%20I%20%3CSTRONG%3Enever%20receive%20the%20LPSPI%20DMA%20completion%20callback%3C%2FSTRONG%3E%20at%20the%20end%20of%20the%20transfer.%3C%2FP%3E%3CP%3EDetails%20and%20relevant%20code%2Fconfig%20are%20in%20the%20attached%20file.%3CBR%20%2F%3ECould%20someone%20point%20out%20what%20I%20might%20be%20missing%2C%20or%20why%20the%20callback%20is%20not%20triggered%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315795%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.mx93%20LPSPI%20%2B%20eDMA%20problem%20on%20Cortex-M33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315795%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20the%20sample%20code.%20Reviewing%20the%20example%20helped%20me%20to%20make%20it%20work.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2315262%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.mx93%20LPSPI%20%2B%20eDMA%20problem%20on%20Cortex-M33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2315262%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%2F259680%22%20target%3D%22_blank%22%3E%40albi84%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20refer%20the%20attachment%20patch%20file%20configuration%20the%20LPDPI%20with%20EDMA%3C%2FP%3E%0A%3CP%3EB.R%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2327224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.mx93%20LPSPI%20%2B%20eDMA%20problem%20on%20Cortex-M33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2327224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ECan%20you%20please%20share%20the%20skeleton%20for%20the%20LPSPI%20with%20eDMA%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2328747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20i.mx93%20LPSPI%20%2B%20eDMA%20problem%20on%20Cortex-M33%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2328747%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt%20is%20not%20a%20skeleton%20but%20the%20actual%20code%20I%20use.%20Does%20this%20help%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E