/* This function caculate the OS tick from PM tick */
static rt_tick_t stm32l4_os_tick_from_pm_tick(rt_uint32_t tick)
/* This function caculate the OS tick from PM tick */
static rt_tick_t stm32l4_os_tick_from_pm_tick(rt_uint32_t tick)
{
    static rt_uint32_t os_tick_remain = 0;
    rt_uint32_t ret, freq;
    freq = stm32l4_lptim_get_countfreq();
    ret = (tick * RT_TICK_PER_SECOND + os_tick_remain) / freq;
    os_tick_remain += (tick * RT_TICK_PER_SECOND);
    os_tick_remain %= freq;
    return ret;
}