MCUXpresso generates invalid eDMA code when "Submit transfer" is enabled (MCXN547 )

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

MCUXpresso generates invalid eDMA code when "Submit transfer" is enabled (MCXN547 )

36 Views
tjo_dk
Fresh Out Contributor

Hi,

I am using MCUXpresso Config Tools v26.x with an MCXN547 project and configuring an ADC -> eDMA transfer using the eDMA peripheral component.

Configuration:

  • eDMA Channel API mode: Transactional (transfer configuration)
  • eDMA request: ADC1 FIFO A request
  • Submit transfer: Enabled
  • Auto stop request: Enabled
  • Peripheral request: Enabled

The generated code in peripherals.c contains:

status = EDMA_SubmitTransfer(&DMA0_CH0_Handle,
                             DMA0_CH0_Transfers_config,
                             1U);
assert(status == kStatus_Success);

However, no declaration for status is generated. As a result, the project fails to compile with:

error: 'status' undeclared (first use in this function)

Expected generated code would be either:

status_t status;
status = EDMA_SubmitTransfer(...);

or:

assert(kStatus_Success ==
       EDMA_SubmitTransfer(...));

Has anyone seen this issue before?

Is this a known code-generation bug in Config Tools, or is there an additional configuration option required when using "Submit transfer"?

I can provide the generated peripherals.c and .mex configuration if needed.

Thanks.

Labels (2)
0 Kudos
Reply
2 Replies

15 Views
carlos_o
NXP TechSupport
NXP TechSupport

Hi @tjo_dk 

Thank you for your post!

Could you please share the which package of MCXN547 are you using?

Which version of Config tools are you using? is it 26.03?

Which SDK version do you have installed? 

Please share this information to replicate the setup on my end.

0 Kudos
Reply

5 Views
tjo_dk
Fresh Out Contributor

Hi

 

Thnaks for the fast responds.

 

Yes, I have v26.03 of the tool

Processors:
MCXN547 (26.03.20) - MCX MCXN

MCUXpresso SDK version 25.13.00

Package: mcuxsdk-core
Version: 2.0.0

The 'Loop all transfeer' in the DMA0- Transfeer Configuration ad this code to DMA0_init()

/* DMA0 loop transfer submit */
status = EDMA_SubmitLoopTransfer(&DMA0_CH0_Handle, DMA0_CH0_Transfers_config, 1U);
assert(status == kStatus_Success);

Where 'status' is not declared anywhere.

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2384996%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMCUXpresso%20generates%20invalid%20eDMA%20code%20when%20%22Submit%20transfer%22%20is%20enabled%20(MCXN547%20%20)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2384996%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHi%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EI%20am%20using%20MCUXpresso%20Config%20Tools%20v26.x%20with%20an%20MCXN547%20project%20and%20configuring%20an%20ADC%20-%26gt%3B%20eDMA%20transfer%20using%20the%20eDMA%20peripheral%20component.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EConfiguration%3A%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3EeDMA%20Channel%20API%20mode%3A%20Transactional%20(transfer%20configuration)%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EeDMA%20request%3A%20ADC1%20FIFO%20A%20request%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3ESubmit%20transfer%3A%20Enabled%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EAuto%20stop%20request%3A%20Enabled%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EPeripheral%20request%3A%20Enabled%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EThe%20generated%20code%20in%20%3C%2FSPAN%3E%3CSPAN%3Eperipherals.c%3C%2FSPAN%3E%3CSPAN%3E%20contains%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3Estatus%20%3D%20EDMA_SubmitTransfer(%26amp%3BDMA0_CH0_Handle%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20DMA0_CH0_Transfers_config%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%201U)%3B%0Aassert(status%20%3D%3D%20kStatus_Success)%3B%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHowever%2C%20no%20declaration%20for%20%3C%2FSPAN%3E%3CSPAN%3Estatus%3C%2FSPAN%3E%3CSPAN%3E%20is%20generated.%20As%20a%20result%2C%20the%20project%20fails%20to%20compile%20with%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3Eerror%3A%20'status'%20undeclared%20(first%20use%20in%20this%20function)%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EExpected%20generated%20code%20would%20be%20either%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3Estatus_t%20status%3B%0Astatus%20%3D%20EDMA_SubmitTransfer(...)%3B%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%20class%3D%22%22%3E%3CSPAN%3Eor%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3Eassert(kStatus_Success%20%3D%3D%0A%20%20%20%20%20%20%20EDMA_SubmitTransfer(...))%3B%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHas%20anyone%20seen%20this%20issue%20before%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EIs%20this%20a%20known%20code-generation%20bug%20in%20Config%20Tools%2C%20or%20is%20there%20an%20additional%20configuration%20option%20required%20when%20using%20%22Submit%20transfer%22%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EI%20can%20provide%20the%20generated%20%3C%2FSPAN%3E%3CSPAN%3Eperipherals.c%3C%2FSPAN%3E%3CSPAN%3E%20and%20%3C%2FSPAN%3E%3CSPAN%3E.mex%3C%2FSPAN%3E%3CSPAN%3E%20configuration%20if%20needed.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2384996%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EBoard%20Design%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMCXN%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2385509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCUXpresso%20generates%20invalid%20eDMA%20code%20when%20%22Submit%20transfer%22%20is%20enabled%20(MCXN547%20%20)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2385509%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThnaks%20for%20the%20fast%20responds.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EYes%2C%20I%20have%20v26.03%20of%20the%20tool%3C%2FP%3E%3CP%3EProcessors%3A%3CBR%20%2F%3EMCXN547%20(26.03.20)%20-%20MCX%20MCXN%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%22%3EMCUXpresso%20SDK%3C%2FSPAN%3E%20version%2025.13.00%3C%2FP%3E%3CP%3EPackage%3A%20mcuxsdk-core%3CBR%20%2F%3EVersion%3A%202.0.0%3C%2FP%3E%3CP%3EThe%20'Loop%20all%20transfeer'%20in%20the%20DMA0-%20Transfeer%20Configuration%20ad%20this%20code%20to%26nbsp%3BDMA0_init()%3C%2FP%3E%3CP%3E%2F*%20DMA0%20loop%20transfer%20submit%20*%2F%3CBR%20%2F%3Estatus%20%3D%20EDMA_SubmitLoopTransfer(%26amp%3BDMA0_CH0_Handle%2C%20DMA0_CH0_Transfers_config%2C%201U)%3B%3CBR%20%2F%3Eassert(status%20%3D%3D%20kStatus_Success)%3B%3C%2FP%3E%3CP%3EWhere%20'status'%20is%20not%20declared%20anywhere.%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2385272%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MCUXpresso%20generates%20invalid%20eDMA%20code%20when%20%22Submit%20transfer%22%20is%20enabled%20(MCXN547%20%20)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2385272%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%2F264030%22%20target%3D%22_blank%22%3E%40tjo_dk%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20post!%3C%2FP%3E%0A%3CP%3ECould%20you%20please%20share%20the%20which%20package%20of%20MCXN547%20are%20you%20using%3F%3C%2FP%3E%0A%3CP%3EWhich%20version%20of%20Config%20tools%20are%20you%20using%3F%20is%20it%2026.03%3F%3C%2FP%3E%0A%3CP%3EWhich%20SDK%20version%20do%20you%20have%20installed%3F%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20share%20this%20information%20to%20replicate%20the%20setup%20on%20my%20end.%3C%2FP%3E%3C%2FLINGO-BODY%3E