2019-11-18 09:40 AM
Hello! I´m new with stm mcu´s and I would like to know how to generate a 10ns pulse with stm32f407 discovery kit. Is it possible?
2019-11-18 12:36 PM
It should be possible to configure your board such that a timer's input clock is 100 MHz. The timer can be setup to generate Output Compare after one timer tick, which should generate a 10 ns wide pulse.
2019-11-18 12:37 PM
Perhaps if you clocked it at 100 MHz, at 168 MHz you could perhaps get 6 or 12ns
I'd imagine you'd configure a TIM in single-shot mode and generate a pulse one cycle wide, or more repetitively via a PWM mode, with and equally narrow pulse width.
10ns seems like something you'd want to consider doing with hardware to account for the "and then" part of your question.
2019-11-18 12:41 PM
Yes, if you set system clock to 100MHz, and use some of the APB2 timers (TIM1/TIM8).
You also might want the highest GPIO_OSPEEDR setting on the given pin to have fast rise/fall times, but then you might need to have somewhat controlled load impedance to avoid reflections/ringing resulting from improper impedance matching and from improper return/ground.
Don't expect the 10ns to be too precise, though.
I'm not sure this is something you should be after as a novice. Have you mastered the basic blinky, yet?
JW