Skip to main content
Visitor II
March 21, 2025
Question

Fixed number (5) of Pulses triggered by external event. (STM32H753ZI to ADS8556)

  • March 21, 2025
  • 1 reply
  • 1352 views

I'm using an STM32H753ZI, specifically the Nucleo H753ZI board, to read data from an ADS8556 adc. Upon signaling to the ADS8556 to start a conversion, a BUSY signal on the adc goes high and falls when the data is ready to be read.

I currently have BUSY connected to PG13, set up as HRTIM1 AF2, with falling edge sensitivity and configured as External Event 10. I have nRD set up on PG6, HRTIM1 CHE1, with its SetSource configured to HRTIM_OUTPUTSET_EEV_10, and its ResetSource as HRTIM_OUTPUTRESET_TIMCMP1, in line with the desired pulse width. For CHE, I also have `ResetTrigger = HRTIM_TIMRESETTRIGGER_UPDATE | HRTIM_TIMRESETTRIGGER_EEV_10`, continuous mode (I've also tried SINGLESHOT_RETRIGGERABLE), and repetition counter = 4.

With this setup, I'm seeing nRD (PG6) pulse once on the falling edge of BUSY, and not the desired 5 (I'm only reading from 5 channels out of 6 on the ADS8556). I've played around with a number of HRTIM configurations, but this is the best I've managed so far. It appears RepetitionCounter is not doing anything, maybe I'm misunderstanding completely.

Am I even on the right track? To distill down my goal, I want to be able to generate 5 active-low pulses on a pin, triggered by the falling edge of an external signal. Another future consideration is I will also need the pin for these 5 pulses to trigger DMA transfers.

Thanks in advanced!

psh25_0-1742552150198.png

psh25_1-1742558795396.png

 

 

    This topic has been closed for replies.

    1 reply

    ST Employee
    March 24, 2025

    Hello, 

    The main purpose of repetition counter is handling interrupt and update rate:

    RM0433: "The main purpose of the repetition counter is to adjust the period interrupt rate and off-load the CPU by decoupling the switching frequency and the interrupt frequency."

    This won't help to generate a specific number of pulses. For this you may need to involve a FW action that disables the counter and outputs at the right moment (pulse low for instance). 

     

    Best regards.

    Graduate
    March 30, 2025

    What about this section in AN4776? "N-pulse waveform generation using one-pulse mode"

    ST Employee
    March 31, 2025

    Hello, 

    The AN4776 and the section is about General purpose timers: GPTIM, and not high-resolution timer: HRTIM, which has a different architecture, and far different features than GPTIM.

    Best regards.