2018-07-09 07:46 AM
2018-07-09 08:55 AM
>>Why is the ADC3 with DMA not working anymore when using the same DMA unit (but different channel of course) additionally for transferring UART4-Tx?
Is the UART4 DMA generating an interrupt, and is that being properly serviced? The CM4 will keep re-entering the IRQ Handler in the cause isn't cleared.
If you stop in a debugger where is it stuck?
2018-07-09 10:38 PM
Hi Clive, thanks for reply.
Is the UART4 DMA generating an interrupt, and is that being properly serviced?
In this example project which I showed you its implementation isn't even finished. I just want to show you that this line
LL_DMA_SetPeriphRequest(DMA2, LL_DMA_CHANNEL_3, LL_DMA_REQUEST_2);
which sets the hardware request, seems to be responsible that the ADC3-DMA-Interrupt doesn't work anymore.
I have some additional information:
In a different project, I have set the ADC3 result transfer on DMA1CH3, and UART4 is still on DMA2CH3. This works!
But when switching from DMA1CH3 to DMA2CH5 its not working anymore!
The problem is, that I have to set it to DMA2CH5 because I need DMA1CH3 for a different hardware.
If you stop in a debugger where is it stuck?
Its stuck in the main while loop. And it does not start AD conversion anymore, since the ADSTART bit keeps being '1', which means
that the ADC is operating and eventually converting a regular channel. (Reference manual)
2018-07-11 10:44 AM
I had a look in the Errata Sheet. It says
DMA2 channels 2 and 3 (respectively) cannot be used when the ADC2 and ADC3 requests are selected on DMA2 channels 4 and 5
This answers my question!