Hello,
I am facing a crash which I don't understand.
The scenario is, the MCU is in VLLS3 state and in this state, the LPTMR instance zero (LPTMR0) is running with LPO as the clock source. The system wakes and goes to RUN state due to a pin interrupt and in the main() function, there is a call to "LPTMR_GetCurrentTimerCount(LPTMR0)" LPTMR API from the SDK. At this point, the system crashes and re-boots.
I have also tried to read some other registers of the TIMER LPTMR0 and every time I try to read any register, the application re-boots.
Somebody please help me whats the reason for this.
Thanks,
Gaurav.
Solved! Go to Solution.
Hi
Before you can read the LPTMR registers you need to enable clocks to it by using something like
POWER_UP(5, SIM_SCGC5_LPTIMER);
This is *(unsigned long *)0x40048038 |= 0x00000001; at its lowest level.
This is valid after each reset, even of the LPTMR otherwise may be operating.
Regards
Mark
Hi
Before you can read the LPTMR registers you need to enable clocks to it by using something like
POWER_UP(5, SIM_SCGC5_LPTIMER);
This is *(unsigned long *)0x40048038 |= 0x00000001; at its lowest level.
This is valid after each reset, even of the LPTMR otherwise may be operating.
Regards
Mark