In STM32f030RB ,TIM1 Time Base Update event only can generate up to 38 micro second
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-09 12:44 AM - edited ‎2024-05-09 2:52 AM
Hi ,
While I am learining the TIM1 of STM32F030RB . Configured TIM prescalr and ARR at diffrent value to get various Update frequency . when I create 1 second it is able to create .
But when i try to create below the 38 micro second the update event still at 38 micro second (maximum 26 KHz)
Why so ?
What is the maximum update event trigger frequency for TIM1 ,is there any limit .?
I used to try 1 micro second update event trigger frequenct but not working
what is the technique behind it ?
how achive in nano second and micro seconds
What is the supported values for Prescaler and ARR for proper operations
or
How to choose ARR and Prescalar values ?
is there any documents for it ?
- Labels:
-
STM32F0 Series
-
TIM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-09 3:28 AM
Hello @thannara123,
>>What is the maximum update event trigger frequency for TIM1 ,is there any limit .?
It depends on the timer's clock frequency, the PSC, and the ARR. As you know, the update event frequency is calculated as follows:
Update event freq= (Timer Clock Frequency)/ ((PSC+1)(ARR+1))
So for higher frequencies, you want to decrease the values of ARR and PSC, however, there are practical limits to how high the frequency can be set due to the microcontroller's clock speed and the minimum values that the PSC and ARR can take
* To achieve a 1ms update freq, you would need to have a timer clock frequency of 1 MHz
* Achieving ns resolution is more challenging because it requires a timer clock frequency in the GHz range, STM32 microcontrollers typically run at a clock up to 180MHz.
For example, this is a configuration that would give you an update event every 1ms:
- Ensure the APB bus to which TIM1 is connected is running at 48 MHz
- Set the prescaler to 0 to have the timer tick at every clock cycle
- Set the ARR to 47 (since the timer counts from 0)
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-09 5:16 AM - edited ‎2024-05-09 5:19 AM
Thanks for the reply .
Yes I know the calculation but i tried to get the maximum value But it is 38 limited ,
There is no document reagarding it that why I asked ?
if we use 48 MHz
we get as follows
T = 1 / (48,000,000 Hz) T ≈ 20.83 nanoseconds
with a low as such as possible Prescale and Low ARR . what will be the Trigger update event frequency can be generate ? (my maximum clk freq is 48Mhz)
I am beginer so such of small question (pardoem ).
Thankyou
