#include <stm32f4xx.h>
#define GPIO_Pin_6 0x0040 /* LED2 */
#define GPIO_Pin_7 0x0080 /* LED1 */
#define PLL_M 8
#define PLL_N 336
#define PLL_P 2
#define PLL_Q 7
uint32_t flag = 0;
int main()
{
RCC_config();
TIMER_config();
GPIO_config();
NVIC_config();
while(1)
{
;
}
void TIM4_IRQHandler(void)
{
if((TIM4->SR&TIM_SR_UIF)){
flag = !flag;
// 清除标志位
CLEAR_BIT(TIM4->SR, TIM_SR_UIF);
#define GPIO_Pin_6 0x0040 /* LED2 */
#define GPIO_Pin_7 0x0080 /* LED1 */
#define PLL_M 8
#define PLL_N 336
#define PLL_P 2
#define PLL_Q 7
uint32_t flag = 0;
int main()
{
RCC_config();
TIMER_config();
GPIO_config();
NVIC_config();
while(1)
{
;
}
}
void TIM4_IRQHandler(void)
{
if((TIM4->SR&TIM_SR_UIF)){
flag = !flag;
// 清除标志位
CLEAR_BIT(TIM4->SR, TIM_SR_UIF);