Hello jch
unfortunately I had some more troubles when using ADC and DMA.
The setting Auto stop request
only results in code when enabling the checkbox.
If I do not enable it I assume that it is disabled, but the reference manual shows that the DREQ bit
is unkonw after reset. In my test cases it always was set to '1' after reset which was not what I wanted it to be when running my code which I set up with MCUXpresso Config Tools.
I think MCUXpresso Config Tools should always include the line
EDMA_EnableAutoStopRequest(DMA_BASEADDR, USED_DMA_CHANNEL, false);
and set it to true if the checkbox is enabled.
Do you think this makes sense to get included in the next MCUXpresso Config Tools build?
Kind regards,
Stefan
已解决! 转到解答。
Hi,
thank you for your feedback and the detailed describtion. I analyzed the problem and now I realized that the default initialized state of the TCD is as you described above. I will prepare the update of the component.
Best Regards,
Martin
Hi,
regarding your issue description, there might be a problem, that you have not called EDMA_ResetChannel() function which will set DREQ (in the component enable Reset channel setting). Please, test it and let me know if the problem remains.
Best Regards
Martin
Hello,
thank you for the hint. The function EDMA_ResetChannel gets called (checkbox active) and therefore the DREQ bit gets set to 1.
If I use the checkbox "Reset channel" (which I think is good because the peripheral will be set to a known state) I have no way to disable the Auto stop request in MCUXpresso Config tools even if the checkbox "Auto stop request" looks like I have disabled the auto stop feature. If I do not set the checkbox Auto stop request no code will be generated and therefore the DREQ bit will stay at 1 until I call
EDMA_EnableAutoStopRequest(DMA0_DMA_BASEADDR, DMA0_CH0_DMA_CHANNEL, false);
in my own source code.
Kind regards,
Stefan
Hi,
thank you for your feedback and the detailed describtion. I analyzed the problem and now I realized that the default initialized state of the TCD is as you described above. I will prepare the update of the component.
Best Regards,
Martin