cancel
Showing results for 
Search instead for 
Did you mean: 

Can the STM32F103 perform a delay of 62 ns or 125 ns?

No_Name
Associate II

Hi.
I'm not very familiar with STM32 yet.

Can STM32F103 delay up to 62ns or 125ns to raise GPIO and lower it again during that time interval?


Thank you :)

4 REPLIES 4
gbm
Principal

No problem. Use TIMx hardware timer in PWM or one-pulse mode.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

So, can the STM32F1 MCU do that without having to use the STM32G4 MCU, which has a higher clock speed?

gbm
Principal

The general-purpose timer of any STM32 can do it easily.

Software delays are impractical and non-reliable and as such should be avoided even if they are theoretically possible.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
Ozone
Principal II

This times correspond to 16MHz and 8MHz, which a F103 is surely capable to achieve with a timer.

However, you didn't tell us anything about the use case.
What is it used for, what accuracy is required, and what is the maximal allowed jitter ?

By the way, quartz oscillators are available with this frequency (16MHz), you could derive it directly from hardware.