Skip to main content
Visitor II
May 7, 2025
Question

STM32H5 GPDMA Linked list example without HAL

  • May 7, 2025
  • 2 replies
  • 1376 views

I am trying to implement a GPDMA driver in a C project that does not use HAL, and have been really struggling to get something working. I have read everything I can find on this peripheral, multiple times, and still don't quite understand how one would configure the registers without using HAL.

 

The goal is to get circular DMA transfers from peripheral to memory (e.g. ADC to memory). The H5 reference manual gives this figure, which conceptually makes sense to me but I can't figure out the implementation.

tbennett_0-1746647568608.png

It seems like it should be relatively simple to setup in C with direct register access instead of HAL configuration structures, but I have not been able to find any examples online or in documentation. I am wondering if anyone has gotten a linked list GPDMA transfer working without having CubeMX + HAL do all the work?

2 replies

Andrew Neil
Super User
May 7, 2025

HAL is just taking stuff out of its structures, and putting it into the registers - so follow through the process that HAL does...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
luisjose_
Graduate
June 25, 2026

Hello! I was struggling a lot too, but I managed to get it working 😎 I've attached the code

I created a simple application to modify the brightness of the user LED in the NUCLEO-H533RE, because I don’t have my logic analyzer yet 🥲, so that was the only way to observe the changes. I set the timer frequency very slow (10 Hz) and sent an array of 24 elements to TIM2 via GPDMA recursively. In this way, it keeps transferring indefinitely haha.

The trick is to structure everything very well and align it properly with the register configuration. If you have any questions, feel free to ask!