Dear Members,
How can I GetTick from the CPU? similar to HAL_GetTick() ?
nrf_drv_systick_get ?
Thanks
Dear Members,
How can I GetTick from the CPU? similar to HAL_GetTick() ?
nrf_drv_systick_get ?
Thanks
Hi Edvin, thanks for the reply,
I want to get :
LastTime=HAL_GetTick();
/** * @brief Provides a tick value in millisecond. * @note This function is declared as __weak to be overwritten in case of other * implementations in user file. * @retval tick value */ __weak uint32_t HAL_GetTick(void) { return uwTick; }
is it equal with LastTime = nrf_systick_val_get();
I need to be in ms (mili Second)
?
Test code,
tick = nrf_systick_val_get(); NRF_LOG_INFO("Systick value = %u.\r\n",tick);
I always get zero, do I miss something ?
Thanks
Hi Edvin, thanks for the reply,
I want to get :
LastTime=HAL_GetTick();
/** * @brief Provides a tick value in millisecond. * @note This function is declared as __weak to be overwritten in case of other * implementations in user file. * @retval tick value */ __weak uint32_t HAL_GetTick(void) { return uwTick; }
is it equal with LastTime = nrf_systick_val_get();
I need to be in ms (mili Second)
?
Test code,
tick = nrf_systick_val_get(); NRF_LOG_INFO("Systick value = %u.\r\n",tick);
I always get zero, do I miss something ?
Thanks
RixtronixLAB said:I want to get :
LastTime=HAL_GetTick();
Where is this snippet from? Where did you find this function?
RixtronixLAB said:I always get zero, do I miss something ?
Yes. You need to start the RTC and the LFCLK. Please see my original answer.