This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X在RTOS下进入standby模式的问题



        目前关于standby模式有些问题,
        在进入standby的模式,会依次
        -> 保存peripherals context
        -> 配置CM3
        -> 使能唤醒源
        -> 禁用模块时钟
        -> 配置最小的OPP
        -> 禁用IRQ

        -> 保存A8 context
        -> 等待唤醒
        -> 恢复A8 context

        -> 使能IRQ
        -> 使能模块时钟
        ......

        目前遇见一个问题,
        在RTOS下进入standby模式,唤醒之后使能IRQ,程序会跑飞;
        在没有RTOS的工程下,唤醒之后可以正常使能IRQ。

        请问打开中断跑飞可能是什么原因?在RTOS下唤醒后开中断是否有什么要求?

        开关中断使用的是CPUirqd()与CPUirqe()
        /*
        **
        ** Wrapper function for the IRQ disable function
        **
        */
        void CPUirqd(void)
        {
            /* Disable IRQ in CPSR */
            asm("    dsb    \n\t"
                "    mrs     r0, CPSR\n\t"
                "    orr     r0, #0x80\n\t"
                "    msr     CPSR, r0");
        }

        /*
        **
        ** Wrapper function for the IRQ enable function
        **
        */
        void CPUirqe(void)
        {
            /* Enable IRQ in CPSR */
            asm("    dsb    \n\t"
                "    mrs     r0, CPSR\n\t"
                "    bic     r0, #0x80\n\t"
                "    msr     CPSR, r0");
        }