2023-10-25 04:54 AM
Hi All,
I am struggling with that the maximum DMA buffer size is 64KB. I am currently transferring the data from an ADC to the Buffer using DMA with circular buffering, but I would want the buffer to be around 200KB. I have heard that one can use MDMA to transfer the DMA buffer information to a bigger buffer. I have never used MDMA before, and there is little information online about how to use it in CubeIDE. If someone can help me to configure the MDMA/DMA to do this, and what functions to use it would be very helpful!
Best regards,
Elso
Solved! Go to Solution.
2023-11-09 05:36 AM
Finally figured it out. This is how I would configure a 6 noded linked list.
This linked list will do a transfer from the a source buffer to a destination buffer when triggered by a software call:
HAL_MDMA_GenerateSWRequest(&hmdma_mdma_channel0_sw_0);
These blocks below in the config file will need to be configured for each node. Example: Source address is replaced with the ptr or address to the source buffer. Destination address is configured the same way for the destination buffer. I would use block count 1 assuming you want to send 1 block, and block size, the size of the data you send.
2023-10-25 05:20 AM
Like this
2023-11-01 02:54 AM
you can find the STM32 cube demos for MDMA on st.com, or can use Cube-MX to build MDMA function automatically.
for example, STM32H747 MCU has MDMA module, you can find "STM32H747", you can find it on st.com, then you can get the completely demo to how to use MDMA.
2023-11-01 04:31 AM
Most of these files does not use a config file/ .IOC. Is MDMA enabled by default? Or do I have to define the macro myself to get the MDMA features?
2023-11-01 06:39 AM - edited 2023-11-01 06:54 AM
In this picture it shows that we can configure that DMA can trigger a request for MDMA, however is it possible for HF (half full), and not only TC (Transfer complete)?
Edit:
Not HF, I meant HT.
2023-11-09 05:36 AM
Finally figured it out. This is how I would configure a 6 noded linked list.
This linked list will do a transfer from the a source buffer to a destination buffer when triggered by a software call:
HAL_MDMA_GenerateSWRequest(&hmdma_mdma_channel0_sw_0);
These blocks below in the config file will need to be configured for each node. Example: Source address is replaced with the ptr or address to the source buffer. Destination address is configured the same way for the destination buffer. I would use block count 1 assuming you want to send 1 block, and block size, the size of the data you send.