• 大小: 1.68MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-02
  • 语言: 其他
  • 标签: stm32  RTC  

资源简介

在STM32的嵌入式开发板上,采用RTC进行计时,利用RTC计时来代替系统时钟

资源截图

代码片段和文件信息

#include“stm32f10x.h“
#include“lcd.h“
#include“stm32f10x_rtc.h“
#include“stm32f10x_pwr.h“
#include“stm32f10x_bkp.h“
void RTC_Configuration(void);
void RTC_Congiguration(void);
void LCD_Init(void);
void LCD_Display(void);
void NVIC_Configuration(void);
unsigned char TimeDisplayFlag=0x00;
unsigned long RTCTime=0;
int h=0m=0s=0hge=0hshi=0mge=0mshi=0sge=0sshi=0;
int main(void)
{
 RTC_Configuration();
 RTC_WaitForLastTask(); 
 RTC_SetCounter(RTCTime);
 RTC_WaitForLastTask();
 LCD_Init();
 NVIC_Configuration();
 while(1)
 {
  LCD_Display();
 }
}
void RTC_Configuration(void)
{
//打开电源管理和备份寄存器时钟
RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | 

RCC_APB1Periph_BKP ENABLE);
//使能RTC及备份寄存器的访问,复位为禁止访问状态
PWR_BackupAccessCmd(ENABLE);
//BKP外设复位
BKP_DeI

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      17273  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c

     文件      85714  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h

     文件      26297  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html

     文件      15766  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s

     文件      15503  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s

     文件      15692  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s

     文件      12376  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s

     文件      13656  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s

     文件      12765  2012-07-31 16:23  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s

     文件      14073  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s

     文件      15955  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s

     文件      11307  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\STM32F10x.s

     文件      13072  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_cl.s

     文件      13160  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd.s

     文件      12482  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_hd_vl.s

     文件       9814  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld.s

     文件      10562  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_ld_vl.s

     文件      10269  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md.s

     文件      11058  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_md_vl.s

     文件      13261  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\startup_stm32f10x_xl.s

     文件      16626  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_cl.s

     文件      16229  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd.s

     文件      15675  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_hd_vl.s

     文件      12650  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld.s

     文件      12950  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_ld_vl.s

     文件      12912  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_md.s

     文件      13601  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_md_vl.s

     文件      16628  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\iar\startup_stm32f10x_xl.s

     文件      12604  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_cl.s

     文件      12592  2012-07-11 16:10  RTC计时\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_hd.s

............此处省略141个文件信息

评论

共有 条评论