Page 1 of 1

1.7 MHz Generation

Posted: Thu May 28, 2020 6:38 pm
by pokemon99
Hello
how to set the timer to get the frequency
1.7 MHz on Stm32f103c8t6, core v1.9.0?
thank

Re: 1.7 MHz Generation

Posted: Thu May 28, 2020 8:00 pm
by stas2z
EDITED

sorry for misunderstanding

if you need to configure your timer to exact 1.7M frequency you need to use smth like

Code: Select all

MyTim->setOverflow(1700000, HERTZ_FORMAT);
when you configure yr timer instance

Re: 1.7 MHz Generation

Posted: Thu May 28, 2020 11:27 pm
by fredbox
Review this information: https://github.com/stm32duino/wiki/wiki ... er-library
Note that 1.7mhz is not an integer multiple of 72 megahertz, so about as close as you can get is 72 / 42 = 1.714 Mhz.