Page 1 of 1

How to get real continuous time

Posted: Sun Jul 04, 2021 2:39 pm
by asdasdasd
Hi,
I have stm32f103,
I have used

Code: Select all

TIME_I2MS(chVTGetSestemTime())

to get real time but the time reset every 32s (16bit).
How can I get 32bit time or 64?

Thanks for any help.

Re: How to get real continuous time

Posted: Sun Jul 04, 2021 2:54 pm
by Giovanni
One of the following solutions:

1) Use an STM32 with a 32 bits timer.
2) Disable tick-less mode, that will use a 32 bits counter variable.
3) Use 64 bits time stamps, this is available on RT7 and forward.

Giovanni

Re: How to get real continuous time

Posted: Mon Jul 05, 2021 7:08 am
by asdasdasd
Giovanni wrote:One of the following solutions:

1) Use an STM32 with a 32 bits timer.
2) Disable tick-less mode, that will use a 32 bits counter variable.
3) Use 64 bits time stamps, this is available on RT7 and forward.

Giovanni


thanks for fast replay,
but I didn't understand what is "RT7" and how to use 64 bits time stamps?
I am using Chibios 20.3.2 with stm32f103c8.
what I just want to have a function like in Arduino (millis()) with 32 bits minimum .

asd,

Re: How to get real continuous time

Posted: Mon Jul 05, 2021 8:04 am
by Giovanni
asdasdasd wrote:
Giovanni wrote:One of the following solutions:

1) Use an STM32 with a 32 bits timer.
2) Disable tick-less mode, that will use a 32 bits counter variable.
3) Use 64 bits time stamps, this is available on RT7 and forward.

Giovanni


thanks for fast replay,
but I didn't understand what is "RT7" and how to use 64 bits time stamps?
I am using Chibios 20.3.2 with stm32f103c8.
what I just want to have a function like in Arduino (millis()) with 32 bits minimum .

asd,


Then solution 2: CH_CFG_ST_TIMEDELTA=0 CH_CFG_ST_FREQUENCY=1000

Giovanni

Re: How to get real continuous time

Posted: Mon Jul 05, 2021 8:40 pm
by electronic_eel
asdasdasd wrote:but I didn't understand what is "RT7"

Welcome to Chibi-Versioning.

RT version 7.0 is part of the ChibiOS Release 21.6. See here for the release notes:
http://forum.chibios.org/viewtopic.php?f=7&t=5863