2021-06-09 01:14 AM
Hello everyone!
Is there any project to generate an Clock output of 20Mhz? I tried with TIM 16 but the best I can get is around 300 kHz
Thanks in advance
Alan Blumenstein
Solved! Go to Solution.
2021-06-09 07:26 AM
@ABlum.2 That pin has the DFSDM1_CKOUT option.I never used this peripheral but its meant for driving external ADCs so the DFSDM1_CKOUT pin can generate a very fast pwm clock signal for you.
Did you tried this already?
2021-06-09 01:29 AM
In the STM32H7 firmware package,
available here:
https://www.st.com/en/embedded-software/stm32cubeh7.html
you have a PWM example \Projects\NUCLEO-H745ZI-Q\Examples\TIM\TIM_PWMOutput
and then it's a matter of adjusting uhPrescalerValue, PERIOD_VALUE and PULSEx_VALUE
2021-06-09 03:01 AM
Are you using a XTAL as a HSEclock source?
How high is your system clock?
Maybe share a snap of your cubeMX page clock setup
2021-06-09 03:05 AM
Hi Javier,
Thanks for the answer here I send you a picture of the clock setup.
2021-06-09 03:08 AM
Hi Mike_ST
Thanks for the response. I tried to play with this example before and I am not reaching the 20 MHz, I also tried to use an interruption were I set a digital output to generate the clock but the frequency drop down to 400 kHz.
Regards
Alan
2021-06-09 03:08 AM
Sounds like you're trying to service an update interrupt rather than let the TIM control the pin directly.
2021-06-09 03:26 AM
Hi Tesla Delorean
Thanks for the answer. Yes the pin I need to control is not realted to any TIM (pin PC2_C) hence I need to toggled it to make the clock.
Regards
Alan
2021-06-09 07:26 AM
@ABlum.2 That pin has the DFSDM1_CKOUT option.I never used this peripheral but its meant for driving external ADCs so the DFSDM1_CKOUT pin can generate a very fast pwm clock signal for you.
Did you tried this already?
2021-06-09 11:52 PM
@Javier Muñoz thanks for the information, I will try this, where can I find this configuration from the image with the filters?
Regards
Alan Blumenstein
2021-06-09 11:54 PM
@ABlum.2 Are you reffering to cubeMX?
The configuration appears under DFSDM peripheral config tab