This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GetTick ?

Dear Members,

How can I GetTick from the CPU? similar to HAL_GetTick() ?

nrf_drv_systick_get ?

Thanks

Parents
  • 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

Reply
  • 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

Children
Related