GPDMA with ADC with multiple channels
Hi,
I am trying to setup GPDMA with ADC with multiple channels on the Nucleo-H563ZI. The DMA should fill a buffer of the length of number of channels in a circular fashion, such that one entry in the buffer array always contains data of the same ADC channel. Unfortunately, I ran into several issues where I would be happy to get some input.
1. How do I enable ADC requests? Is that only possible with the function HAL_ADC_Start_DMA? If I use this function, it fills only the first entry in my buffer and does not circle through it.
2. When implementing GPDMA, I am able to get a circular buffer filling to work by setting it up in linked list mode. I create a node for every "transaction", with both the source and destination fixed. The source is the same for all nodes and I define one entry of my destination array as a destination for each node. I have set it up like this because according to the documentation it seems like a request can only trigger the execution of a full node or the whole linked list and not individual "transactions" within a linked list node. However, this does not work in link step mode (LinkStepMode = DMA_LSM_1LINK_EXECUTION), only in run-to-completion mode. I would like to set it up such that the ADC conversion requests a DMA transfer of only one value.
Could you maybe give me some pointers as to what I am doing wrong?
Thanks and best regards,
Julia
