S32K312 eDMA: Understanding CITER Auto-Reload Behavior

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

S32K312 eDMA: Understanding CITER Auto-Reload Behavior

171 Views
Prateeksha_Jain
Contributor I

Hi everyone,

I am working with eDMA on the NXP S32K312 MCU and would like to understand the behavior of the TCDn_CITER register.

I observed that when CITER reaches zero at the end of the major loop, it automatically reloads its value from TCDn_BITER.

I would like to clarify the following:

  1. Is this automatic reload the expected hardware behavior on the S32K312?

  2. Under what conditions does CITER reload from BITER after the major loop completes?

  3. Is there any configuration that allows CITER to remain at zero instead of reloading from BITER?

I am interested specifically in understanding the CITER register behavior.

Thank you!

0 Kudos
Reply
1 Reply

154 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Prateeksha_Jain 

Questions 1 and 2 are addressed in the S32K3xx Reference Manual, Rev. 12. The manual states that when the major iteration count is exhausted, the eDMA performs several end-of-major-loop operations, including the final source and destination address adjustments and reloading the BITER value into CITER.

Regarding Question 3, there is no dedicated configuration bit that allows CITER to remain at zero once the major loop has completed. The reload of CITER from BITER is part of the eDMA hardware state machine and is performed automatically.

However, if your goal is to stop the channel from servicing additional DMA requests after the major loop completes, you may want to look into using the DREQ bit. This scenario has been previously discussed in the thread How to prevent eDMA TCDn_CITER from auto reloading TCDn_BITER.

 

BR, VaneB

%3CLINGO-SUB%20id%3D%22lingo-sub-2423706%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K312%20eDMA%3A%20Understanding%20CITER%20Auto-Reload%20Behavior%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2423706%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EHi%20everyone%2C%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EI%20am%20working%20with%20eDMA%20on%20the%20NXP%20S32K312%20MCU%20and%20would%20like%20to%20understand%20the%20behavior%20of%20the%20%3C%2FSPAN%3E%3CSPAN%3ETCDn_CITER%3C%2FSPAN%3E%3CSPAN%3E%20register.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EI%20observed%20that%20when%20CITER%20reaches%20zero%20at%20the%20end%20of%20the%20major%20loop%2C%20it%20automatically%20reloads%20its%20value%20from%20%3C%2FSPAN%3E%3CSPAN%3ETCDn_BITER%3C%2FSPAN%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EI%20would%20like%20to%20clarify%20the%20following%3A%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EIs%20this%20automatic%20reload%20the%20expected%20hardware%20behavior%20on%20the%20S32K312%3F%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EUnder%20what%20conditions%20does%20CITER%20reload%20from%20BITER%20after%20the%20major%20loop%20completes%3F%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EIs%20there%20any%20configuration%20that%20allows%20CITER%20to%20remain%20at%20zero%20instead%20of%20reloading%20from%20BITER%3F%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EI%20am%20interested%20specifically%20in%20understanding%20the%20CITER%20register%20behavior.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%20color%3D%22%23000000%22%3E%3CSPAN%3EThank%20you!%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2423765%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K312%20eDMA%3A%20Understanding%20CITER%20Auto-Reload%20Behavior%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2423765%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%2F267665%22%20target%3D%22_blank%22%3E%40Prateeksha_Jain%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EQuestions%201%20and%202%20are%20addressed%20in%20the%20S32K3xx%20Reference%20Manual%2C%20Rev.%2012.%20The%20manual%20states%20that%20when%20the%20major%20iteration%20count%20is%20exhausted%2C%20the%20eDMA%20performs%20several%20end-of-major-loop%20operations%2C%20including%20the%20final%20source%20and%20destination%20address%20adjustments%20and%20reloading%20the%20BITER%20value%20into%20CITER.%3C%2FP%3E%0A%3CP%3ERegarding%20Question%203%2C%20there%20is%20no%20dedicated%20configuration%20bit%20that%20allows%20CITER%20to%20remain%20at%20zero%20once%20the%20major%20loop%20has%20completed.%20The%20reload%20of%20CITER%20from%20BITER%20is%20part%20of%20the%20eDMA%20hardware%20state%20machine%20and%20is%20performed%20automatically.%3C%2FP%3E%0A%3CP%3EHowever%2C%20if%20your%20goal%20is%20to%20stop%20the%20channel%20from%20servicing%20additional%20DMA%20requests%20after%20the%20major%20loop%20completes%2C%20you%20may%20want%20to%20look%20into%20using%20the%20DREQ%20bit.%20This%20scenario%20has%20been%20previously%20discussed%20in%20the%20thread%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FHow-to-prevent-edma-TCDn-CITER-from-auto-reloading-TCDn-BITER%2Fm-p%2F1380717%22%20target%3D%22_blank%22%3EHow%20to%20prevent%20eDMA%20TCDn_CITER%20from%20auto%20reloading%20TCDn_BITER%3C%2FA%3E.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBR%2C%20VaneB%3C%2FP%3E%3C%2FLINGO-BODY%3E