Platform/ECM3532/M3/hw/power/ecm3532/src/eta_pwr_gov.c
/**
 *  pre lpm work func
 *
 *  stops HW timer if running
 *
 * @param ticks  amounts of ticks in idle
 *
 * @return actual sleep ticks programmed
 */
pre lpm work func
stops HW timer if running

@param ticks  amounts of ticks in idle

@return actual sleep ticks programmed
pre lpm work func stops HW timer if running @param ticks amounts of ticks in idle @return actual sleep ticks programmed
int ecm35xx_pre_lpm(uint32_t sticks)
{
    if (ecm3531_pg.tmr_state == TIMER_RUN)
    {
        ecm3531_pg.elapsed_cnt = HalTmrRead(ecm3531_pg.ti);
        HalTmrStop(ecm3531_pg.sPmTmr);
        ecm3531_pg.tmr_state = TIMER_STOP;
    }
    return sticks;
}
int ecm35xx_pre_lpm ( uint32_t sticks ) { if ( ecm3531_pg . tmr_state == TIMER_RUN ) { ecm3531_pg . elapsed_cnt = HalTmrRead ( ecm3531_pg . ti ) ; HalTmrStop ( ecm3531_pg . sPmTmr ) ; ecm3531_pg . tmr_state = TIMER_STOP ; } return sticks ; }
pre lpm work func
  stops HW timer if running
pre lpm work func stops HW timer if running