Crash while calling an SDK functinon

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Crash while calling an SDK functinon

ソリューションへジャンプ
1,063件の閲覧回数
gauravbanyal
Contributor IV

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.

タグ(1)
0 件の賞賛
返信
1 解決策
883件の閲覧回数
mjbcswitzerland
Specialist V

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

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
884件の閲覧回数
mjbcswitzerland
Specialist V

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

0 件の賞賛
返信