2021-05-07 01:41 PM
Dear Sir/Madam,
I hope you are doing well,
We are working on a project in which 50 pulses should be generated with a particular delay, and these pulses should be repeated in a period (0.02 seconds).
We are using a Nucleo-F446RE board to do the project,
We want to know how we could use the MCU's timers to produce such pulses?
Is there any way to use Timers with a specific delay to generate 50 pulses?
I am looking forward to hearing from you,
Many thanks.
2021-05-07 01:51 PM
The Advanced Timers can generate counted pulse trains using the Repetition Count option, triggered in a one-shot mode.
Other timers within the system can trigger the TIM
The timers are quite complex, review the chapters and associativity in the Reference Manual thoroughly
2021-05-07 02:13 PM
Another option would be using two timers in master-slave arrangement, slave generating the rapid pulses as PWM, being set to Gatd mode in the slave-mode controller; master generating the gating so that the active period (i.e. when slave is enabled) is exacty 50 slave cycles long.
JW
2021-05-08 08:59 AM
In fact, we want to have 8 pure pulses at the end of the story.
But
These 8 pulses are produced from a total of several pulses.
That means we have 64 pulses in the beginning.
According to the definition we have, we come from the width of our different pulses (from the first 64) and pulsar (or) and make our final 8 pulses.
These pulses have a frequency of 50 and that 0.2 is the frequency of our pulses.
But we also have to put a delay between the pulses.
2021-05-08 01:49 PM
I don't understand your explanation. You may want to make a timing diagram.
But, at the end of the day, it's your task to get this going, so start playing with various settings of one timer, try then a master-slave arrangement between two timers. This all after reading the TIM chapter in RM thoroughly.
JW