2020-08-04 11:45 PM
Hello,
I know that it is possible to cross series two timers to achieve high resolution one. In my case, 32bit resolution is enough. As a result, I would use TIM1 and TIM3 in STM32F030K6T6 to reach desired high resolution frequency generator. Unfortunately it is a little confusing for me to cascading these two timers for 100001Hz Frequency when MCU clock is working at 48MHz. Can anyone help me regarding configuring stm32cube for my purpose.
Thanks advanced.
2020-08-05 01:04 AM
For a digital signal with basic timer you cannot achieve such a frequency resolution. At 48 MHz 480 ticks give you exactly 100 kHz but 479 ticks give 100 209 Hz.
2020-08-05 02:38 AM
in STM32 cross-series timer overview the possibility is proven but I cannot configure internals interrupts. Please help me.
2020-08-05 03:06 AM
You have misunderstood something. You can make lower frequencies with a better frequency resolution, but you cannot make 100'001 Hz.
2020-08-05 10:01 AM
If possible to divide clock by more than 16bit 48MHz/479995=100.001. And after that if I count to 1000, I will get the precision that is required. What is wrong with this assumption?
2020-08-05 10:53 AM
Can't you just split the 48 MHz down using the prescaler and period
ie 48000 and 1000 or 4800 and 10000, or some other pair of factors that each fit in 16-bit ?
Prescaler = 4800 - 1;
Period = 10000 - 1;
Or are you trying to count 1 Hz ticks?
Where is 100001 Hz coming into this
2020-08-05 11:02 AM
If you count to 1000, you will lower the input freq by a factor of 1000, i.e. you end up at ca. 0.100001 Hz.
2020-08-05 11:44 AM
I need to design a clock source which is vary from 10KHz to 150KHz and required resolution is 1Hz.
2020-08-05 11:45 AM
You are right I forgot about "-1".
2020-08-05 05:59 PM
You can't achieve this by dividing from a given frequency source. In other words, you can't do this simply by setting up timer in STM32.
JW