cancel
Showing results for 
Search instead for 
Did you mean: 

I want to get the trigger for every 8th pulse in the timers?

Sm.2
Associate II

I am using the stm32h745ziq-nucleo board . I am generating the pulse in the cm7 and I am trying ton capture the falling edge of the pulse. I am getting the falling edge capture for every falling pulse But I want to capture only the 8th falling edge of that pulse.

What are the changes I want to make to get the 8th falling Edge capture.

Best Regards

sm.

4 REPLIES 4
MasterT
Lead

Use another timer as a divider by 8. Than cascade two timers.

The TIM should have an Input Prescaler for the pins, although it won't let you pick particular pulses out of a train, it does permit measurement of period, over 1, 2, 4 or 8 pulses and that can be averaged

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Sm.2
Associate II

Hi @MasterT​ ,

Hi @Community member​ ,

I had gone through the reference manual But somewhere I am missing something ... If you send one example code base that would be great.

Regards

sm

MasterT
Lead

After reading more replay, it;s not clear what is CM7 - another uCPU / board? Or it's the same, and you just routed signal to outside peripheral and need to get another synchronise pulse /8 ?.

For examples of code, get yourself stm32CubeMX software package installed, it includes bunch of projects for each board. I see InputCapture is missing in the stm32h745ziq subfolder, but you can study stm32h743 - should not be very different.

https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-mcu-mpu-packages/stm32cubeh7.html