Toggle the led using DMA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-12 12:54 AM
I'm using STM32G071RBT6 MCU . In that I'm using DMA to toggle the on board LED. So it's very simple but somehow it is not toggling.
The on board led is LED3 that is in port 5(PA5). I' using circular DMA to toggle it or even if i have to turn on the led through DMA ,still it won't work. here is an example ....
Here is the DMA config-
here is the gpio output that i have to write
now here is the code-
uint32_t led = 0x00000020;
//uint32_t led = GPIO_ODR_OD5;
this example is to just turn on the led.
HAL_DMA_Start(&hdma_dma_generator0, (uint32_t)led, (uint32_t)&GPIOA->ODR, 1);
Still it doesn't turn on.
Solved! Go to Solution.
- Labels:
-
DMA
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-12 02:56 AM
Interesting, i didnt know that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-12 02:00 AM
In G0 series, based on Cortex-M0+, GPIO ports cannot be accessed by DMA. See the picture in the Reference Manual showing the bus matrix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-12 02:09 AM
https://community.st.com/s/question/0D53W00000trZY8SAM/software-pwm-best-approach
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-12 02:56 AM
Interesting, i didnt know that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-12 10:45 AM
Thanks @Javier Muñoz​ you were a great help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-07-18 07:17 AM
Glad i was helpful, did you figure it out?
you could select my answer as best answer so i get ST points, so i can win a ST tshirt or a mug.
