資源簡介
在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個文件信息
- 上一篇:算符優先分析 編譯原理
- 下一篇:HslCommunication
評論
共有 條評論