当前位置: 首页>>代码示例>>C++>>正文


C++ RCC_ClearFlag函数代码示例

本文整理汇总了C++中RCC_ClearFlag函数的典型用法代码示例。如果您正苦于以下问题:C++ RCC_ClearFlag函数的具体用法?C++ RCC_ClearFlag怎么用?C++ RCC_ClearFlag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RCC_ClearFlag函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: systemInit

void systemInit(void)
{
    // Configure NVIC preempt/priority groups
    NVIC_PriorityGroupConfig(NVIC_PRIORITY_GROUPING);

#ifdef STM32F10X
    // Turn on clocks for stuff we use
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
#endif

    // cache RCC->CSR value to use it in isMPUSoftreset() and others
    cachedRccCsrValue = RCC->CSR;
    RCC_ClearFlag();


    enableGPIOPowerUsageAndNoiseReductions();


#ifdef STM32F10X
    // Turn off JTAG port 'cause we're using the GPIO for leds
#define AFIO_MAPR_SWJ_CFG_NO_JTAG_SW            (0x2 << 24)
    AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_NO_JTAG_SW;
#endif

    // Init cycle counter
    cycleCounterInit();


    memset(&exti15_10_handlers, 0x00, sizeof(exti15_10_handlers));
    // SysTick
    SysTick_Config(SystemCoreClock / 1000);
}
开发者ID:budebulai,项目名称:SkyoverCF,代码行数:32,代码来源:system.c

示例2: platform_watchdog_check_last_reset

bool platform_watchdog_check_last_reset( void )
{
    boot_reason=0;
    if(RCC_GetFlagStatus(RCC_FLAG_SFTRST))
    {//Software Reset
      boot_reason=BOOT_REASON_SOFT_RST;
    }
    else if(RCC_GetFlagStatus(RCC_FLAG_IWDGRST))
    {
      boot_reason=BOOT_REASON_WDG_RST;
    }
    else if(RCC_GetFlagStatus(RCC_FLAG_WWDGRST))
    {
      boot_reason=BOOT_REASON_WWDG_RST;
    }
    else if(RCC_GetFlagStatus(RCC_FLAG_LPWRRST))
    {
      boot_reason=BOOT_REASON_LOWPWR_RST;
    }
    else if(RCC_GetFlagStatus(RCC_FLAG_BORRST))
    {
      boot_reason=BOOT_REASON_BOR_RST;
    }
    else if(RCC_GetFlagStatus(RCC_FLAG_PORRST))
    {//Power-On-Reset
      boot_reason=BOOT_REASON_PWRON_RST;
    }
    else if(RCC_GetFlagStatus(RCC_FLAG_PINRST))
    {//Always set, test other cases first
      boot_reason=BOOT_REASON_EXPIN_RST;
    }
    //cli_printf("boot_reason:%d\r\n",boot_reason);
    RCC_ClearFlag();
    return true;
}
开发者ID:MrZANE42,项目名称:WiFiMCU,代码行数:35,代码来源:platform_watchdog.c

示例3: main

/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured, 
       this is done through SystemInit() function which is called from startup
       file (startup_stm32f10x_xx.s) before to branch to application main.
       To reconfigure the default setting of SystemInit() function, refer to
       system_stm32f10x.c file
     */     

  /* Initialize LED1 and Key Button mounted on STM3210X-EVAL board */       
  STM_EVAL_LEDInit(LED1);
  STM_EVAL_LEDInit(LED2);
  STM_EVAL_PBInit(BUTTON_KEY, BUTTON_MODE_EXTI);


  /* Check if the system has resumed from WWDG reset */
  if (RCC_GetFlagStatus(RCC_FLAG_WWDGRST) != RESET)
  { 
    /* WWDGRST flag set */
    /* Turn on LED1 */
    STM_EVAL_LEDOn(LED1);

    /* Clear reset flags */
    RCC_ClearFlag();
  }
  else
  {
    /* WWDGRST flag is not set */
    /* Turn off LED1 */
    STM_EVAL_LEDOff(LED1);
  }

  /* NVIC configuration */
  NVIC_Configuration();

  /* WWDG configuration */
  /* Enable WWDG clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE);

/* On Value line devices, WWDG clock counter = (PCLK1 (24MHz)/4096)/8 = 732 Hz (~1366 æs)  */
/* On other devices, WWDG clock counter = (PCLK1(36MHz)/4096)/8 = 1099 Hz (~910 æs)  */
  WWDG_SetPrescaler(WWDG_Prescaler_8);

  /* Set Window value to 65 */
  WWDG_SetWindowValue(65);

  /* On Value line devices, Enable WWDG and set counter value to 127, WWDG timeout = ~1366 æs * 64 = 87.42 ms */
  /* On other devices, Enable WWDG and set counter value to 127, WWDG timeout = ~910 æs * 64 = 58.25 ms */
  WWDG_Enable(127);

  /* Clear EWI flag */
  WWDG_ClearFlag();

  /* Enable EW interrupt */
  WWDG_EnableIT();

  while (1)
  {
  }
}
开发者ID:ngocthanhtnt,项目名称:ledshow,代码行数:65,代码来源:main.c

示例4: systemInit

void systemInit(void)
{
#ifdef CC3D
    /* Accounts for OP Bootloader, set the Vector Table base address as specified in .ld file */
    extern void *isr_vector_table_base;

    NVIC_SetVectorTable((uint32_t)&isr_vector_table_base, 0x0);
#endif
    // Configure NVIC preempt/priority groups
    NVIC_PriorityGroupConfig(NVIC_PRIORITY_GROUPING);

#ifdef STM32F10X
    // Turn on clocks for stuff we use
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
#endif

    RCC_ClearFlag();


    enableGPIOPowerUsageAndNoiseReductions();


#ifdef STM32F10X
    // Turn off JTAG port 'cause we're using the GPIO for leds
#define AFIO_MAPR_SWJ_CFG_NO_JTAG_SW            (0x2 << 24)
    AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_NO_JTAG_SW;
#endif

    // Init cycle counter
    cycleCounterInit();

    // SysTick
    SysTick_Config(SystemCoreClock / 1000);
}
开发者ID:Hwurzburg,项目名称:cleanflight,代码行数:34,代码来源:system.c

示例5: systemInit

void systemInit(void)
{
    checkForBootLoaderRequest();

    SetSysClock();

    // Configure NVIC preempt/priority groups
    NVIC_PriorityGroupConfig(NVIC_PRIORITY_GROUPING);

    // cache RCC->CSR value to use it in isMPUSoftreset() and others
    cachedRccCsrValue = RCC->CSR;

    /* Accounts for OP Bootloader, set the Vector Table base address as specified in .ld file */
    extern void *isr_vector_table_base;
    NVIC_SetVectorTable((uint32_t)&isr_vector_table_base, 0x0);
    RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_OTG_FS, DISABLE);

    RCC_ClearFlag();

    enableGPIOPowerUsageAndNoiseReductions();

    // Init cycle counter
    cycleCounterInit();

    memset(extiHandlerConfigs, 0x00, sizeof(extiHandlerConfigs));
    // SysTick
    SysTick_Config(SystemCoreClock / 1000);
}
开发者ID:rayone,项目名称:betaflight-1,代码行数:28,代码来源:system_stm32f4xx.c

示例6: main

/**
  * @brief   Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured, 
       this is done through SystemInit() function which is called from startup
       file (startup_stm32f10x_xx.s) before to branch to application main.
       To reconfigure the default setting of SystemInit() function, refer to
       system_stm32f10x.c file
     */     
       
  /* Initialize Leds mounted on STM3210X-EVAL board */
  STM_EVAL_LEDInit(LED1);
  STM_EVAL_LEDInit(LED2);
  STM_EVAL_LEDInit(LED3);
  STM_EVAL_LEDInit(LED4);
  
  /* Enable PWR and BKP clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);

  /* Enable write access to Backup domain */
  PWR_BackupAccessCmd(ENABLE);

  /* Clear Tamper pin Event(TE) pending flag */
  BKP_ClearFlag();

  /* Check if the Power On Reset flag is set */
  if(RCC_GetFlagStatus(RCC_FLAG_PORRST) != RESET)
  {
    /* Clear reset flags */
    RCC_ClearFlag();

    /* Turn on LED3 */
    STM_EVAL_LEDOn(LED3);
   
    /* Check if Backup data registers are programmed */
    if(CheckBackupReg(0x3210) == 0x00)
    { /* Backup data registers values are correct */

      /* Turn on LED1 */
      STM_EVAL_LEDOn(LED1);
    }
    else
    { /* Backup data registers values are not correct or they are not yet
         programmed (when the first time the program is executed) */

      /* Write data to Backup data registers */
      WriteToBackupReg(0x3210);

      /* Turn on LED2 */
      STM_EVAL_LEDOn(LED2);
    }
  }

  /* Turn on LED4 */
  STM_EVAL_LEDOn(LED4);
       
  while (1)
  {    
  }
}
开发者ID:Dzenik,项目名称:QuadVolucer,代码行数:64,代码来源:main.c

示例7: main

/*******************************************************************************
* Function Name  : main
* Description    : Main program.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
int main(void)
{
#ifdef DEBUG
  debug();
#endif

  /* System Clocks Configuration */
  RCC_Configuration();
  
  /* NVIC configuration */
  NVIC_Configuration();

  /* GPIO configuration */
  GPIO_Configuration();
  
  /* Enable PWR and BKP clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);

  /* Enable write access to Backup domain */
  PWR_BackupAccessCmd(ENABLE);

  /* Clear Tamper pin Event(TE) pending flag */
  BKP_ClearFlag();

  /* Check if the Power On Reset flag is set */
  if(RCC_GetFlagStatus(RCC_FLAG_PORRST) != RESET)
  {
    /* Clear reset flags */
    RCC_ClearFlag();

    /* Turn on led connected to GPIO_LED Pin8 */
    GPIO_SetBits(GPIO_LED, GPIO_Pin_8);
   
    /* Check if Backup data registers are programmed */
    if(CheckBackupReg(0x3210) == 0x00)
    { /* Backup data registers values are correct */

      /* Turn on led connected to GPIO_LED Pin6 */
      GPIO_SetBits(GPIO_LED, GPIO_Pin_6);
    }
    else
    { /* Backup data registers values are not correct or they are not yet
         programmed (when the first time the program is executed) */

      /* Write data to Backup data registers */
      WriteToBackupReg(0x3210);

      /* Turn on led connected to GPIO_LED Pin7 */
      GPIO_SetBits(GPIO_LED, GPIO_Pin_7);
    }
  }

  /* Turn on led connected to GPIO_LED Pin9 */
  GPIO_SetBits(GPIO_LED, GPIO_Pin_9);  
       
  while (1)
  {    
  }
}
开发者ID:zaurus04,项目名称:cortexm3,代码行数:66,代码来源:main.c

示例8: systemInit

void systemInit(bool overclock)
{

#ifdef STM32F303xC
    // start fpu
    SCB->CPACR = (0x3 << (10*2)) | (0x3 << (11*2));
#endif

#ifdef STM32F303xC
    SetSysClock();
#endif
#ifdef STM32F10X_MD
    // Configure the System clock frequency, HCLK, PCLK2 and PCLK1 prescalers
    // Configure the Flash Latency cycles and enable prefetch buffer
    SetSysClock(overclock);
#endif

    // Configure NVIC preempt/priority groups
    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);

#ifdef STM32F10X_MD
    // Turn on clocks for stuff we use
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
#endif

    RCC_ClearFlag();


    enableGPIOPowerUsageAndNoiseReductions();


#ifdef STM32F10X_MD
    // Turn off JTAG port 'cause we're using the GPIO for leds
#define AFIO_MAPR_SWJ_CFG_NO_JTAG_SW            (0x2 << 24)
    AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_NO_JTAG_SW;
#endif

    ledInit();
    beeperInit();

    // Init cycle counter
    cycleCounterInit();

    // SysTick
    SysTick_Config(SystemCoreClock / 1000);

#ifdef CC3D
    spiInit(SPI1);
    spiInit(SPI2);
#endif

#ifndef CC3D
    // Configure the rest of the stuff
    i2cInit(I2C2);
#endif

    // sleep for 100ms
    delay(100);
}
开发者ID:Reini60,项目名称:cleanflight,代码行数:59,代码来源:system.c

示例9: RTC_Init

 /**
  * @file   RTC_Init
  * @brief  RTC Initialization
  * @param  无
  * @retval 无
  */
void RTC_Init(void)
{
  if (BKP_ReadBackupRegister(BKP_DR1)!= 0xA5A5)
  {
    /* Backup data register value is not correct or not yet programmed (when
    the first time the program is executed) */
    printf("RTC not yet configured....\r\n");
    /* RTC Configuration */
     RTC_Configuration();
	   Time_Regulate();
	/* Adjust time by values entred by the user on the hyperterminal */
    printf("RTC configured....\r\n");
    BKP_WriteBackupRegister(BKP_DR1, 0xA5A5);
  }
  else
  {
    /* Check if the Power On Reset flag is set */
    if (RCC_GetFlagStatus(RCC_FLAG_PORRST) != RESET)
    {
      printf("Power On Reset occurred....\r\n");
    }
    /* Check if the Pin Reset flag is set */
    else if (RCC_GetFlagStatus(RCC_FLAG_PINRST) != RESET)
    {
      printf("External Reset occurred....\r\n");
    }

    printf("No need to configure RTC....\r\n");
    /* Wait for RTC registers synchronization */
    RTC_WaitForSynchro();

    /* Enable the RTC Second */
    RTC_ITConfig(RTC_IT_SEC, ENABLE);
    /* Wait until last write operation on RTC registers has finished */
    RTC_WaitForLastTask();
  }

   /* NVIC configuration */
   NVIC_Configuration();

#ifdef RTCClockOutput_Enable
  /* Enable PWR and BKP clocks */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);

  /* Allow access to BKP Domain */
  PWR_BackupAccessCmd(ENABLE);

  /* Disable the Tamper Pin */
  BKP_TamperPinCmd(DISABLE); /* To output RTCCLK/64 on Tamper pin, the tamper
                                 functionality must be disabled */

  /* Enable RTC Clock Output on Tamper Pin */
  BKP_RTCOutputConfig(BKP_RTCOutputSource_CalibClock);
#endif

   /* Clear reset flags */
  RCC_ClearFlag();
  return;
}
开发者ID:pyjhhh,项目名称:stm32_f1x,代码行数:65,代码来源:rtc.c

示例10: checkResetType

void checkResetType()
{
    uint32_t rst = RCC->CSR;

    evrPush(( rst & (RCC_CSR_PORRSTF | RCC_CSR_PADRSTF | RCC_CSR_SFTRSTF) ) ? EVR_NormalReset : EVR_AbnormalReset , rst >> 24 );

    RCC_ClearFlag();
}
开发者ID:UIKit0,项目名称:AQ32Plus,代码行数:8,代码来源:drv_system.c

示例11: HAL_Core_Init

void HAL_Core_Init(void)
{
    if (HAL_Feature_Get(FEATURE_RESET_INFO))
    {
        // Clear RCC reset flags
        RCC_ClearFlag();
    }
}
开发者ID:spark,项目名称:firmware,代码行数:8,代码来源:core_hal.c

示例12: main

/**
  * @brief   Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  
  /* Setup the microcontroller system. Initialize the Embedded Flash Interface,  
     initialize the PLL and update the SystemFrequency variable. */
  SystemInit();

  /* Initialize Leds mounted on STM3210X-EVAL board */
  STM_EVAL_LEDInit(LED1);
  STM_EVAL_LEDInit(LED2);
  STM_EVAL_LEDInit(LED3);
  STM_EVAL_LEDInit(LED4);
  
  /* Enable PWR and BKP clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR | RCC_APB1Periph_BKP, ENABLE);

  /* Enable write access to Backup domain */
  PWR_BackupAccessCmd(ENABLE);

  /* Clear Tamper pin Event(TE) pending flag */
  BKP_ClearFlag();

  /* Check if the Power On Reset flag is set */
  if(RCC_GetFlagStatus(RCC_FLAG_PORRST) != RESET)
  {
    /* Clear reset flags */
    RCC_ClearFlag();

    /* Turn on LED3 */
    STM_EVAL_LEDOn(LED3);
   
    /* Check if Backup data registers are programmed */
    if(CheckBackupReg(0x3210) == 0x00)
    { /* Backup data registers values are correct */

      /* Turn on LED1 */
      STM_EVAL_LEDOn(LED1);
    }
    else
    { /* Backup data registers values are not correct or they are not yet
         programmed (when the first time the program is executed) */

      /* Write data to Backup data registers */
      WriteToBackupReg(0x3210);

      /* Turn on LED2 */
      STM_EVAL_LEDOn(LED2);
    }
  }

  /* Turn on LED4 */
  STM_EVAL_LEDOn(LED4);
       
  while (1)
  {    
  }
}
开发者ID:jwithee,项目名称:bearboard,代码行数:62,代码来源:main.c

示例13: systemInit

void systemInit(void)
{
    GPIO_InitTypeDef GPIO_InitStructure;
    uint8_t i;

    gpio_config_t gpio_cfg[] = {
        { LED0_GPIO, LED0_PIN, GPIO_Mode_Out_PP }, // PB3 (LED)
        { LED1_GPIO, LED1_PIN, GPIO_Mode_Out_PP }, // PB4 (LED)
#ifndef FY90Q
        { BEEP_GPIO, BEEP_PIN, GPIO_Mode_Out_OD }, // PA12 (Buzzer)
#endif
    };
    uint8_t gpio_count = sizeof(gpio_cfg) / sizeof(gpio_cfg[0]);

    // Turn on clocks for stuff we use
    RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2 | RCC_APB1Periph_TIM3 | RCC_APB1Periph_TIM4 | RCC_APB1Periph_I2C2, ENABLE);
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO | RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_TIM1 | RCC_APB2Periph_ADC1 | RCC_APB2Periph_USART1, ENABLE);
    RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA1, ENABLE);
    RCC_ClearFlag();

    // Make all GPIO in by default to save power and reduce noise
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
    GPIO_Init(GPIOA, &GPIO_InitStructure);
    GPIO_Init(GPIOB, &GPIO_InitStructure);
    GPIO_Init(GPIOC, &GPIO_InitStructure);

    // Turn off JTAG port 'cause we're using the GPIO for leds
    GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);

    // Configure gpio
    for (i = 0; i < gpio_count; i++) {
        GPIO_InitStructure.GPIO_Pin = gpio_cfg[i].pin;
        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
        GPIO_InitStructure.GPIO_Mode = gpio_cfg[i].mode;
        GPIO_Init(gpio_cfg[i].gpio, &GPIO_InitStructure);
    }

    LED0_OFF;
    LED1_OFF;
    BEEP_OFF;

    // Init cycle counter
    cycleCounterInit();

    // SysTick
    SysTick_Config(SystemCoreClock / 1000);

    // Configure the rest of the stuff
    adcInit();
#ifndef FY90Q
    i2cInit(I2C2);
#endif

    // sleep for 100ms
    delay(100);
}
开发者ID:mcu786,项目名称:baseflight-1,代码行数:57,代码来源:drv_system.c

示例14: main

/*******************************************************************************
* Function Name  : main
* Description    : Main program.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
int main(void)
{
#ifdef DEBUG
  debug();
#endif

  /* System Clocks Configuration */
  RCC_Configuration();

  /* GPIO configuration */
  GPIO_Configuration();

  /* Check if the system has resumed from WWDG reset */
  if (RCC_GetFlagStatus(RCC_FLAG_WWDGRST) != RESET)
  { /* WWDGRST flag set */
    /* Set GPIO_LED pin 6 */
    GPIO_SetBits(GPIO_LED, GPIO_Pin_6);

    /* Clear reset flags */
    RCC_ClearFlag();
  }
  else
  { /* WWDGRST flag is not set */
    /* Reset GPIO_LED pin 6 */
    GPIO_ResetBits(GPIO_LED, GPIO_Pin_6);
  }

  /* Configure Key Button EXTI Line to generate an interrupt on falling edge */
  EXTI_Configuration();

  /* NVIC configuration */
  NVIC_Configuration();

  /* WWDG configuration */
  /* Enable WWDG clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE);

  /* WWDG clock counter = (PCLK1/4096)/8 = 244 Hz (~4 ms)  */
  WWDG_SetPrescaler(WWDG_Prescaler_8);

  /* Set Window value to 65 */
  WWDG_SetWindowValue(65);

  /* Enable WWDG and set counter value to 127, WWDG timeout = ~4 ms * 64 = 262 ms */
  WWDG_Enable(127);

  /* Clear EWI flag */
  WWDG_ClearFlag();

  /* Enable EW interrupt */
  WWDG_EnableIT();

  while (1)
  {}
}
开发者ID:zaurus04,项目名称:cortexm3,代码行数:62,代码来源:main.c

示例15: main

/**
  * @brief  Main program.
  * @param  None
  * @retval None
  */
int main(void)
{
  /* Setup the microcontroller system. Initialize the Embedded Flash Interface,
     initialize the PLL and update the SystemFrequency variable. */
  SystemInit();

  /* Initialize LED1 and Key Button mounted on STM3210X-EVAL board */       
  STM_EVAL_LEDInit(LED1);
  STM_EVAL_LEDInit(LED2);
  STM_EVAL_PBInit(Button_KEY, Mode_EXTI);


  /* Check if the system has resumed from WWDG reset */
  if (RCC_GetFlagStatus(RCC_FLAG_WWDGRST) != RESET)
  { 
    /* WWDGRST flag set */
    /* Turn on LED1 */
    STM_EVAL_LEDOn(LED1);

    /* Clear reset flags */
    RCC_ClearFlag();
  }
  else
  {
    /* WWDGRST flag is not set */
    /* Turn off LED1 */
    STM_EVAL_LEDOff(LED1);
  }

  /* NVIC configuration */
  NVIC_Configuration();

  /* WWDG configuration */
  /* Enable WWDG clock */
  RCC_APB1PeriphClockCmd(RCC_APB1Periph_WWDG, ENABLE);

  /* WWDG clock counter = (PCLK1/4096)/8 = 1099 Hz (~910 µs)  */
  WWDG_SetPrescaler(WWDG_Prescaler_8);

  /* Set Window value to 65 */
  WWDG_SetWindowValue(65);

  /* Enable WWDG and set counter value to 127, WWDG timeout = ~910 µs * 64 = 58.25 ms */
  WWDG_Enable(127);

  /* Clear EWI flag */
  WWDG_ClearFlag();

  /* Enable EW interrupt */
  WWDG_EnableIT();

  while (1)
  {
  }
}
开发者ID:jwithee,项目名称:bearboard,代码行数:60,代码来源:main.c


注:本文中的RCC_ClearFlag函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。