[APM32E1] stop低功耗唤醒测试例程参考RTC和按键唤醒

[复制链接]
2101|12
 楼主| Alden 发表于 2024-6-30 19:33 | 显示全部楼层 |阅读模式
#申请原创#
在上一篇《[size=1em]APM32 MINI开发板功耗测试方式》的基础上:https://bbs.21ic.com/icview-3364108-1-1.html
我又测试了一版st库的休眠唤醒例程,加了RTC唤醒的配置。
  1. int main()
  2. {

  3.         SysTick_Init(8);
  4.         NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);  //中断优先级分组 分2组
  5.         LED_Init();
  6.         USART1_Init(9600);
  7.         //KEY_Init();//按键唤醒
  8.         RTC_Init();//RTC唤醒
  9.         led1=0;
  10. //        DBGMCU_Config(DBGMCU_STOP,ENABLE);
  11.         while(1)
  12.         {
  13. //                printf("time: 5\r\n");
  14. //                led1=0;
  15. //                delay_ms(1000);        //隔1秒显示计数
  16. //               
  17. //                printf("time: 4\r\n");
  18. //                led1=1;
  19. //                delay_ms(1000);
  20. //               
  21.                 printf("time: 3\r\n");
  22.                 led1=1;
  23.                 delay_ms(1000);
  24.                
  25.                 printf("time: 2\r\n");
  26.                 led1=0;
  27.                 delay_ms(1000);
  28.                
  29.                 printf("time: 1\r\n");
  30.                 led1=1;
  31.                 delay_ms(1000);
  32.                
  33.                 printf("进入系统待机模式\r\n");

  34.         //        Enter_Standby_Mode();       
  35. RTC_Set_Alarm_Time(5);
  36. Enter_StopMode(PWR_Regulator_LowPower);

  37.         USART1_Init(9600);
  38.                         printf("out系统待机模式\r\n");
  39.         }
  40. }
进stop前配置5s的闹钟唤醒,休眠后等5s自动唤醒,具体配置参考附件。
待机唤醒RTC.zip (4.09 MB, 下载次数: 7)
caigang13 发表于 2024-7-1 08:32 来自手机 | 显示全部楼层
ST库能够直接兼容?
 楼主| Alden 发表于 2024-7-5 15:24 | 显示全部楼层
caigang13 发表于 2024-7-1 08:32
ST库能够直接兼容?

可以的
nuan11nuan 发表于 2024-7-11 20:57 | 显示全部楼层
这种模式下是不是就不能仿真了啊?
pe66ak 发表于 2024-7-11 22:10 | 显示全部楼层
用闹钟唤醒的话,这种稳定吗?
ewyu 发表于 2024-7-11 23:21 | 显示全部楼层
话说,这种休眠功耗咋样啊?很低吧
hhdhy 发表于 2024-7-12 07:33 | 显示全部楼层
还没用过apm32的低功耗模式呢,和ST的相比那个更有优势?
tiakon 发表于 2024-7-12 09:13 | 显示全部楼层
请教一下,这种E1和F1相比,有啥不一样?
canfeil 发表于 2024-7-12 10:25 | 显示全部楼层
其实RTC定时唤醒挺好用的,我觉得是这样
teaccch 发表于 2024-7-12 11:33 | 显示全部楼层
一般来说,这种定时唤醒准不准啊?
一切D都好 发表于 2024-7-12 13:05 | 显示全部楼层
用的ST的休眠唤醒例程,对比功耗了没?
nqty 发表于 2024-7-12 14:11 | 显示全部楼层
这种RTC唤醒很好玩啊,有机会我也要玩玩
星星点点didi 发表于 2024-7-12 16:50 | 显示全部楼层
是不是定时时间越长,功耗月底啊?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

49

主题

115

帖子

2

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