cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG virtual timer

ann
Associate II

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?

1 REPLY 1
Winfred LU
ST Employee

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.