Dec 16, 2020
04:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 16, 2020
04:53 AM
Hello,
Can STM0 and STM1 have different time base and start at different times? to elaborate, both STMs will operate with same frequency so ticks will always be increased with the same rate, but can STM0 and STM1 have different values and have a shift between them? e.g
at a specific time stamp STM0 has value of 20 and STM1 has a value of 30
at another time stamp STM0 has a value of 40 and STM1 has a value of 50,
so they both increased with same rate which is expected due to having same pll source, but can such scenario take place? can there exist a value shift between them for any reason such as one of them started before the other or so on?
Can STM0 and STM1 have different time base and start at different times? to elaborate, both STMs will operate with same frequency so ticks will always be increased with the same rate, but can STM0 and STM1 have different values and have a shift between them? e.g
at a specific time stamp STM0 has value of 20 and STM1 has a value of 30
at another time stamp STM0 has a value of 40 and STM1 has a value of 50,
so they both increased with same rate which is expected due to having same pll source, but can such scenario take place? can there exist a value shift between them for any reason such as one of them started before the other or so on?
- Tags:
- IFX
6 Replies
Dec 16, 2020
09:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 16, 2020
09:47 AM
Under normal circumstances, no - they're driven by the same clock, so the delta will remain constant. But it's possible (albeit unlikely) for one to be corrupted by a soft error (bit flip).
Dec 17, 2020
12:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 17, 2020
12:53 AM
How you make sure that you access STM0 and STM1 at the same time? They are connected together on the SPB. It is not possible to access both modules at the same time to get an identically value. There will be always a difference, I think it is the difference between this two accesses what you see.
Dec 21, 2020
07:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 21, 2020
07:57 AM
I have an issue where STM0 and STM1 have a very large shift even between the deltas between them, they start normally with equal values, then the shift keeps getting larger and larger until it reaches about 120k ticks, this happens consistently, and I have no idea why would suddenly during runtime the shift happens, they start normally at the beginning with equal values and then they keep deviating, what could cause such deviating?
Dec 21, 2020
12:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 21, 2020
12:25 PM
All the STMs are fed by the same clock source (divider set by CCUCON0.STMDIV), so they shouldn't diverge. They're all enabled by default, but I'm not sure where they're started within the internal firmware. But once started, the offset should be constant.
Are you reading STMx_TIM0, or one of the higher order variants (TIM1..TIM6)?
Also: why does it matter?
Are you reading STMx_TIM0, or one of the higher order variants (TIM1..TIM6)?
Also: why does it matter?
Dec 22, 2020
04:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 22, 2020
04:47 AM
Make sure that register STM_OCS is 0. If there is the OCDS Suspend Control is enabled then every time the suspend line is activated (e.g. by debugger, system halt) the STM stops counting.
Jul 20, 2022
11:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 20, 2022
11:55 PM
Reading STMx_TIM0 and STMx_TIM6 to read the 64bit timer value, x - 0 and 2, to perform STM:MONITOR ESM. STM_OCS is excluded already. Occasionally a difference of 1000 ticks is observed. Could you please suggest what could be going wrong ?