Can it be possible to trigger DMA using a GPIO pin in STM32?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-27 12:06 AM
For my application I'm using a comparator and i have set a reference voltage(threshold) for that and my application is that, if the current passes through the threshold then my comparator output should be turn on(1 or 0). I have set the comparator output as GPIO pin. So as soon as the gpio pin get high(when current passes through the threshold), I want to trigger my DMA to do the following instructions and i don't want to use interrupts. So is it possible and how?
- Labels:
-
DMA
-
GPIO-EXTI
-
STM32G0 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-27 3:25 AM
Used a pin related to a TIM to generate the trigger.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-27 3:40 AM
I don't want to use it as timer pin. i want to use it as normal gpio pin. For that I've figured it out a solution but i don't know how to use it.
First i have set that particular pin to GPIO_EXTI pin and set it as in rising edge.
Second I've request a DMA on that pin.
But i Don't know what should i do next? Should i just start the dma in interrupt mode or what( HAL_DMA_Start_IT(hdma, SrcAddress, DstAddress, DataLength)).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-27 4:09 AM
Which STM32?
In older STM32, there was no other way than to use timer pin.
In newer STM32 with DMAMUX, there may be DMAMUX inputs connected to EXTI lines. Read the DMAMUX chapter in RM. I don't have first-hand experience with these.
I don't know if this can be clicked in CubeMX, I don't use Cube.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-27 4:11 AM
oh okay btw I'm using STM32G030K8 microcontroller
