2021-06-11 01:36 AM
I'm just getting started with STM32, so I'll ask
I need to generate a 25ns pulse 75ns gap on one output and again
On the other the same, but shifted by 180 degrees, ie by 50ns
Is it in the power of STM32 timers to do this?
The whole is mainly the rising edges of the pulse, they must have a fixed distance.
I compare their phase shift on a phase comparator
this signal generoji with a handful of 74LVCxxx leaning on TCXO, but I would like to drastically simplify the matter
Thank you for kicking in the right direction
2021-06-11 01:40 AM
Which stm32 mcu are you using?
You should take a look at https://deepbluembedded.com/stm32-timers-tutorial-hardware-timers-explained/
Pay speciall atention to everything related to Timer slave modes it should be interesting for your project.
Using a master timer to create a delay and trigger secondary timers.
This is also a good lecture :
2021-06-11 02:23 AM
In newer STM32 models, timers have Combined mode, which allows to generate phase-shifted waveforms within one timer. It's simpler than using the master-slave mechanism between timers, which for cycle-precision suffers from undocumented latencies.
JW
2021-06-11 03:46 AM
Thanks.
The choice of using series and type is entirely up to me.
Yes, the price plays a role (not the big and expensive ones), the size of the case (ideally smaller than 48 pins), those with lower consumption have priority
I look on MCU with Combined mode.
>undocumented latencies.
Yes that's exactly what I'm afraid of, plus
STM32 cannot work with such a fast external crystal, ie use an internal PLL for the clock
Here is the question of how very stable (temperature, long-term in time), how accurate the duty cykle is, etc.
2021-06-11 07:02 AM
Seems quite doable to me using 2 timers, one slave in gated mode and one master, on any STM32 series.
Probably not something HAL supports, but if you're comfortable making your own code and reading the reference manual, it should not be too difficult.
2021-06-11 07:15 AM
>>undocumented latencies.
>Yes that's exactly what I'm afraid of
That's why I recommend using any newer STM32 ('F3, 'L4, 'G0, 'G4, 'H7) which has the Combined mode in Timer.
> Here is the question of how very stable (temperature, long-term in time),
PLL jitter is specified in datasheet.
I'd recommend you to buy a cheap Nucleo board, maybe start with the 'G4 family, and try.
JW