2382351_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2382351_en-US

2382351_en-US

[i.MX RT1186] How to achieve the exact equivalent of STM32 "DMA Circular Mode" using eDMA?

Hi everyone,

I am currently working on a motor control project using the i.MX RT1186.

In my application, I use the eFlexPWM to trigger ADC conversions. I want to use the eDMA to continuously transfer these ADC conversion results into a ring buffer in the memory.

My goal is to make the eDMA run endlessly: once the buffer is full, the eDMA pointer should automatically wrap around to the beginning of the buffer and continue overwriting the oldest data, completely without any CPU intervention.

Could anyone please advise on the standard way to configure the eDMA to achieve this continuous circular behavior on the RT1186?

Are there any specific SDK examples or fsl_edma API configurations you could recommend for this use case?

Any code snippets or guidance would be greatly appreciated.

Thank you!

i.MXRTRe: [i.MX RT1186] How to achieve the exact equivalent of STM32 "DMA Circular Mode" using e

Dear @guogai ,

Thank you for your question.

Currently, there is no official example combining ADC with eDMA available for the i.MX RT1180 series in the MCUXpresso SDK.

However, you may find the following resources helpful:

  • We provide a ADC application guide , which introduces ADC configuration and usage. I believe it can give you a good understanding of how the ADC module works.
  • For eDMA, you can refer to the following SDK demo to become familiar with the eDMA module and its usage:
    eDMA memory-to-memory example

Based on your use case, I have the following suggestions:

  1. Use ADC continuous/circular sampling functionality (recommended)
    The ADC itself supports continuous conversion, and the result FIFO can store up to 16 samples. You can periodically read the FIFO and perform filtering in software.
    This approach is relatively simple and easier to implement.

  2. Implement DMA circular behavior manually (advanced option)
    If you would like to achieve behavior similar to STM32 “DMA circular mode,” you will need to configure the registers manually based on the reference manual.

タグ(1)
評価なし
バージョン履歴
最終更新日:
4 時間前
更新者: