2023-07-06 03:16 AM
I came across the term in the user manual of L4P5 series that shadow register, auto preload register and auto reload register in timer operation
what is the difference between three of them?
Solved! Go to Solution.
2023-07-07 01:29 AM
Hello @ajimathew ,
So, writing to or reading from the auto-reload register accesses the preload register. The content of the preload register are transferred into the shadow register permanently or at each update event (UEV), depending on the auto-reload preload enable bit (ARPE) in TIMx_CR1 register.
For more explanation I advise you to take a look at AN4776 General-purpose timer cookbook for STM32 microcontrollers and precisely 1.4.2 The preload feature of the timer registers Section.
When your question is answered, please close this topic by choosing "Accept as Solution". This will help other users find that answer faster.
Kaouthar
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.
2023-07-07 01:29 AM
Hello @ajimathew ,
So, writing to or reading from the auto-reload register accesses the preload register. The content of the preload register are transferred into the shadow register permanently or at each update event (UEV), depending on the auto-reload preload enable bit (ARPE) in TIMx_CR1 register.
For more explanation I advise you to take a look at AN4776 General-purpose timer cookbook for STM32 microcontrollers and precisely 1.4.2 The preload feature of the timer registers Section.
When your question is answered, please close this topic by choosing "Accept as Solution". This will help other users find that answer faster.
Kaouthar
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.
2023-07-07 10:27 PM
Hello @KDJEM.1 . Okay I partially understood the above answer. But what do you mean by "auto-reload register is preloaded" ?
2023-07-08 06:14 AM
I've written a comprehensive article on STN32 Timers that map help to explain some questions you are having with Timers.
https://jaxcoder.com/Post/Index?guid=456f6a89-1a93-4a72-bab9-4cf3a9e7f9b6
2023-07-10 02:47 AM
Hi @ajimathew ,
The preload feature of the timer registers section in AN4776 General-purpose timer cookbook for STM32 microcontrollers explains that the preload feature is available for the auto-reload timer register (TIMx_ARR).
The TIMx_ARR timer register contains the reload value of the timer counter.
– If the timer counter is up-counting and it reaches the content of the timer auto-reload register (TIMx_ARR), then the timer counter resets itself and a new counting cycle is restarted.
– If the timer counter is down-counting and it reaches the zero value, then the timer counter value is set to the content of the timer auto-reload register (TIMx_ARR) and a new counting cycle is restarted.
Thank you.
Kaouthar
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.