[技术问题解答]

KEA64 如何实现低功耗?有例程吗?

[复制链接]
1992|10
手机看帖
扫描二维码
随时随地手机跟帖
西门扫雪| | 2015-10-30 21:52 | 显示全部楼层
应该是可以吧,不过没见到例程

使用特权

评论回复
风的样子| | 2015-10-31 10:22 | 显示全部楼层
官网上应该有例程的吧

使用特权

评论回复
FSL_TICS_Jeremy| | 2015-11-2 10:29 | 显示全部楼层
例程包没有专门的例程,但是KEA系列低功耗模式相对简单,你可以使用以下代码进入stop,wait模式
/***********************************************************************/
/*
* Configures the ARM system control register for STOP (deep sleep) mode
* and then executes the WFI instruction to enter the mode.
*
* Parameters:
* none
*
* Note: Might want to change this later to allow for passing in a parameter
*       to optionally set the sleep on exit bit.
*/

void stop (void)
{
        /* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */
        SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;       

        /* WFI instruction will start entry into STOP mode */
#ifndef KEIL
        // If not using KEIL's uVision use the standard assembly command
        asm("WFI");
#else
        // If using KEIL's uVision, use the CMSIS intrinsic
        __wfi();
#endif
}
/***********************************************************************/
/*
* Configures the ARM system control register for WAIT (sleep) mode
* and then executes the WFI instruction to enter the mode.
*
* Parameters:
* none
*
* Note: Might want to change this later to allow for passing in a parameter
*       to optionally set the sleep on exit bit.
*/

void wait (void)
{
        /* Clear the SLEEPDEEP bit to make sure we go into WAIT (sleep) mode instead
         * of deep sleep.
         */
        SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;       

        /* WFI instruction will start entry into WAIT mode */
#ifndef KEIL
        // If not using KEIL's uVision use the standard assembly command
        asm("WFI");
#else
        // If using KEIL's uVision, use the CMSIS intrinsic
    __wfi();
#endif
}


使用特权

评论回复
jhhero| | 2015-12-15 10:32 | 显示全部楼层
怎么退出来呢,我外部中断唤不醒啊

使用特权

评论回复
奥德赛| | 2015-12-15 11:03 | 显示全部楼层
可以找一下同类型的代码改一下

使用特权

评论回复
jhhero| | 2015-12-16 11:10 | 显示全部楼层
低功耗我已经做好了,把不用的外设关一下,降低频率,再进wait或stop就可以了

使用特权

评论回复
zzgg86|  楼主 | 2016-7-25 16:47 | 显示全部楼层
jhhero 发表于 2015-12-16 11:10
低功耗我已经做好了,把不用的外设关一下,降低频率,再进wait或stop就可以了 ...

能否详细描述下,谢谢

使用特权

评论回复
zzgg86|  楼主 | 2016-7-26 17:21 | 显示全部楼层
FSL_TICS_Jeremy 发表于 2015-11-2 10:29
例程包没有专门的例程,但是KEA系列低功耗模式相对简单,你可以使用以下代码进入stop,wait模式

你好,我参数你的函数 可以进出stop 模式,但是电流仍然比较大,约有10mA左右, 另外,进入stop模式后无法唤醒,我是通过串口2 唤醒,但是唤醒不了,请指教。
谢谢

使用特权

评论回复
不想取名字| | 2017-12-12 16:25 | 显示全部楼层
我的也是,进入stop模式后,电流还有200多ua,硬件上面所有的外设都拆除了,软件上没有开任何外设

使用特权

评论回复
北海326| | 2018-2-7 09:44 | 显示全部楼层
同求,有没有做过这块的坛友?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

8

主题

39

帖子

1

粉丝