请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MSP432P401R 您好! 我正在尝试在 MSP-EXP432P401R 版本1.0电路板(DriverLib - v4_00_00_11)上使用 Timer32执行睡眠例程。 这是我要使用的代码:
void Timer32_sleep_cycles (uint32_t cycles) { //将 MCLK 的 Timer32配置为"uint32_t cycles"周期在周期模式下*/ map_Timer32_initModule (TIMER32_0_base、TIMER32_prescaler_1、TIMER32_32位、TIMER32_INT_Interrupt 模式 );t_enable_Interrupt 模式 map_Timer32_setCount (TIMER32_0_base、cycles); map_Timer32_enableInterrupt (TIMER32_0_base); map_Timer32_startTimer (TIMER32_0_base、true); MAP_Interrupt_enableSlepOnIsrExit(); MAP_Interrupt_enableMaster(); MAP_PCM_gotoLPM0Interrupt(); MAP_Interrupt_enableMaster(); } void T32_INTC_IRQHandler (void) {Timer32_clearInterruptFlag (TIMER32_0_BASE); disruptIsoExit}
如果我使用 MAP_PCM_gotoLPM0 ()、该函数会起作用、但如果我使用中断安全版本、程序会在 Default_Handler (void)中挂起。
为什么会发生这种情况、最重要的是、如何解决这种情况?