[技术问题解答] KEA64 如何实现低功耗?有例程吗?

[复制链接]
2765|10
 楼主| zzgg86 发表于 2015-10-30 16:02 | 显示全部楼层 |阅读模式
KEA64 如何实现低功耗?有例程吗?  谢谢
西门扫雪 发表于 2015-10-30 21:52 | 显示全部楼层
应该是可以吧,不过没见到例程
风的样子 发表于 2015-10-31 10:22 | 显示全部楼层
官网上应该有例程的吧
FSL_TICS_Jeremy 发表于 2015-11-2 10:29 | 显示全部楼层
例程包没有专门的例程,但是KEA系列低功耗模式相对简单,你可以使用以下代码进入stop,wait模式
  1. /***********************************************************************/
  2. /*
  3. * Configures the ARM system control register for STOP (deep sleep) mode
  4. * and then executes the WFI instruction to enter the mode.
  5. *
  6. * Parameters:
  7. * none
  8. *
  9. * Note: Might want to change this later to allow for passing in a parameter
  10. *       to optionally set the sleep on exit bit.
  11. */

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

  16.         /* WFI instruction will start entry into STOP mode */
  17. #ifndef KEIL
  18.         // If not using KEIL's uVision use the standard assembly command
  19.         asm("WFI");
  20. #else
  21.         // If using KEIL's uVision, use the CMSIS intrinsic
  22.         __wfi();
  23. #endif
  24. }
  25. /***********************************************************************/
  26. /*
  27. * Configures the ARM system control register for WAIT (sleep) mode
  28. * and then executes the WFI instruction to enter the mode.
  29. *
  30. * Parameters:
  31. * none
  32. *
  33. * Note: Might want to change this later to allow for passing in a parameter
  34. *       to optionally set the sleep on exit bit.
  35. */

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

  42.         /* WFI instruction will start entry into WAIT mode */
  43. #ifndef KEIL
  44.         // If not using KEIL's uVision use the standard assembly command
  45.         asm("WFI");
  46. #else
  47.         // If using KEIL's uVision, use the CMSIS intrinsic
  48.     __wfi();
  49. #endif
  50. }


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

粉丝
快速回复 在线客服 返回列表 返回顶部