AnsweredAssumed Answered

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

Question asked by Wayne Taylor on Apr 6, 2012
Latest reply on Apr 10, 2012 by Martin Kojtal

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. 

Outcomes