cancel
Showing results for 
Search instead for 
Did you mean: 

Differences between GPDMA request and trigger in STM32U5

diverger
Senior

Hi,

In STM32U5, the GPDMA has both request sources and trigger sources, what's the difference between them?

Thanks.

5 REPLIES 5
STOne-32
ST Employee

Dear @diverger ,

Here is a specific Application note on our GPDMA :https://www.st.com/resource/en/application_note/an5593-how-to-use-the-gpdma-for-stm32-mcus-stmicroelectronics.pdf

You can go to Page 7 for the GPDMA Request that can by software or triggered by hardware for peripherals.

let us know what is your specific need or software example to better support.

Hope it helps ,

STOne-32

Hi,

I want to read from an external ADC with SPI interface. As I need a stable sample interval, so I need to use a timer to kick the readings continuously. So, my plan is to use a timer to trigger a SPI RX DMA. But there is not enough information about how to implement this on STM32U5. Any suggestions, is it possible?

Thanks.

ThierryV
Associate II

Hi, I'm also confused between trigger and request events, especially as they don't share the same sources.

 

The page 7 of the Application Note doesn't really help me.

But the figure 67 of the Reference Manual (RM0456, #17.4.13, rev5) is very interresting.

What I understand is that Request Events trigger the transfer of a single piece of data (single or burst), while Trigger Events request the initiation of the whole sequence. Right?

But what's happen if there are request events without any trigger? No transfer?

 

My use case is to sequentially copy a table to a GPIO port (and the section 3.7 of the application note is very short).

  1. For parallel communication with external devices
  2. For software PWMs (there isn't enough timer channels available in STOP 2, I need them for other purposes)

For (1), I need to start the frame transfer by software, while for (2), I need a continuously repeated sequence.

For both, I need a clock (typically a timer) to copy each cells of the table at the expected speed.

Unfortunately, software "event" is only available as a Request (through SWREQ), while there is very few timer sources available under Request events, for the LPDMA1 (lptim1_ue_dma and lptim3_ue_dma, but I use these timers for other purpose. I'm looking for LPTIM4, which is only available as a Trigger).

Alternatively, I can try to start the sequence via software by enabling the DMA channel, and trigger the transfer of a block of a single cell with lptim4_out. But I need the source address is automatically incremented and never reseted, untile the end of my table.

 

Otherwise, the transmission speed for (1) could be very fast (up to 200ns per cell, but above all no less) and without any constant rate contraints, since my table contains its own external clock. So, maybe I can try to tune the AHB clock bus to match that speed?

 

Thanks.

 

 

Hi,

IMO, the 'trigger source' is just an event to fire the DMA xfr, but has no data path to the DMA. But the 'request' is what will also source/sink data to the DMA.

Regards.

ThierryV
Associate II

OK. This is what I need. A fire to trigger the copy of the next cell to the port. The data isn't related the timer.

In opposit to an UART for exemple, where the peripheral has the event and the data (maybe an handshake/acknowledge mecanism under a "Request"?).