Skip to main content
ann
Visitor II
August 12, 2019
Question

BlueNRG virtual timer

  • August 12, 2019
  • 1 reply
  • 672 views

i checked databook , but couldn't find out the maximum value of HAL_VTimerGetCurrentTime_sysT32();

if it's maximum value is max value of uint32_t? (i.e. 4294967295)

besides, how to restart the virtual timer?

This topic has been closed for replies.

1 reply

Winfred LU
ST Employee
September 6, 2019

HAL_VTimerGetCurrentTime_sysT32() returns a 32bit absolute current time expressed in internal time units.

To convert the internal time units to milliseconds, please call HAL_VTimerDiff_ms_sysT32()

The code would be something like:

time_ms = HAL_VTimerDiff_ms_sysT32(HAL_VTimerGetCurrentTime_sysT32(), 0);

The maximum value is 4294967296, which is approximately 174 minutes.