Skip to main content
Explorer II
July 1, 2024
Question

DMA Register Timer Input Capture STM32G431

  • July 1, 2024
  • 1 reply
  • 620 views

Hi,

I would like to measure the times and pulse lengths of an external signal from a GPIO. For this I wanted to use a DMA trigger (which writes the time points from the Tim to the memory).
Here are 2 questions:
1. where can I find a document that states which DMA channel reads which register (generally for all registers and specifically for the timer)? (I have not found anything in the reference manual)
2. how can I trigger the DMA in the event of an edge?

Bests

Brian

    This topic has been closed for replies.

    1 reply

    Super User
    July 2, 2024

    > which DMA channel reads which register

    DMA channels can read from any address, as per their memory or peripheral address register (depending on direction). There may be consequences of reading some registers, same as when you read them from software (e.g. clearing status bits in hardware).

    In your case, start with reading the TIM, DMAMUX and DMA chairs in RM. Set up Timer Capture in TIM, test, and if confident with that, wet up DMA triggered by the respective CCxF flag, to transfer the respective TIMx_CCRx to memory buffer. 

    JW