MQX3.8 with K53n512, Reading Low Power Timer causes unhandled interrupt?

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

MQX3.8 with K53n512, Reading Low Power Timer causes unhandled interrupt?

669件の閲覧回数
Jeronimo479
Contributor II

I'm trying to do some very simple timing and wanted to use the low power timer as my source instead of the clunky MQX seconds & milliseconds timer.

 

I wanted to read the low power timer register and save that in uint16_t start. Then later read it again and store that in uint16_t stop.The following snippet shows how I get an unhandled interrupt when I step to "tmp=p->CNR;"

 

    LPTMR_MemMapPtr    p = LPTMR0_BASE_PTR;
    uint16_t        tmr = p->CNR;

 

It did not behave this way in MQX 3.7. Does this have anything to do with protected mode vs. User mode.

In "mqx_cnfg.h" I found "#define MQX_ENABLE_USER_MODE 0" (that is the default), so I didn't think this was the problem. 

0 件の賞賛
返信
1 返信

421件の閲覧回数
c0170
Senior Contributor III

Hello Jeronimo479,

 

I would firstly check if you have enabled clock for that peripheral : SIM_SCGC5 for LPTIMER . That could cause unhandled interrupt.

 

Regards,

MartinK