cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-1 : HAL_VTimerStart_ms always returns 0x01 error

MHara.2
Associate II

I copied the code snippet and vtimer.c from RTC_Virtual_Timer project to BLE_Beacon project. But HAL_VTimerStart_ms always returns 0x01 error(=timer already started). Similarly, I copied the same code to Micro_Sleep_Test project, it works normally with 0x00. It's unlikely, does that mean the BLE stack is using the same VTimer? (The BLE stack seems to have some VTimer functions. Micro_Sleep_Test project does not use the BLE stack.)

Why does the difference occur? and Is there a workaround?

1 REPLY 1
MHara.2
Associate II

HAL_VTimerStart_ms() of BLE_Beacon project is

int HAL_VTimerStart_ms(uint8_t timerNum, int32_t msRelTimeout);

Other hand, HAL_VTimerStart_ms() of RTC_Virtual_Timer project is

int HAL_VTimerStart_ms(VTIMER_HandleType *timerHandle, uint32_t msRelTimeout);

The difference was the first argument.

Why is it making such a difference, it's annoying!

When I set the "uint8_t timerNum", VTimer in the BLE_Beacon project is working correctly.