From 96ca4b1952c1c4bf85704208f53c97b45a875b04 Mon Sep 17 00:00:00 2001 From: zhyinch <zhyinch@gmail.com> Date: 星期一, 01 十月 2018 12:25:53 +0800 Subject: [PATCH] 更改距离设置格式 --- 源码/核心板/Src/OnChipDevices/Rcc_Nvic_Systick.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" index 14e9205..6e55e6b 100644 --- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" +++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Rcc_Nvic_Systick.c" @@ -44,7 +44,7 @@ void Nvic_Init(void) { NVIC_InitTypeDef NVIC_InitStructure; - EXTI_InitTypeDef EXTI_InitStructure; + NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); /* Enable and set EXTI Interrupt to the lowest priority */ @@ -53,11 +53,7 @@ NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; - EXTI_InitStructure.EXTI_Line = EXTI_Line17; - EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; - EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; - EXTI_InitStructure.EXTI_LineCmd = ENABLE; - EXTI_Init(&EXTI_InitStructure); + NVIC_InitStructure.NVIC_IRQChannel = RTCAlarm_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; @@ -70,7 +66,7 @@ int Systick_Init(void) { int time_retry = 500; - if (SysTick_Config(64000)) + if (SysTick_Config(72000)) { /* Capture error */ while (time_retry--); @@ -100,4 +96,4 @@ { uint32_t i=1000*nTimer; delay_us(i); -} \ No newline at end of file +} -- Gitblit v1.9.3