各位大侠,如下配置,掉电不进中断,请问哪里问题? void PVD_Configuration(void) { #if 1 EXTI_InitTypeDef EXTI_InitStructure; /* Enable PWR and BKP clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); /* Configure EXTI Line16(PVD Output) to generate an interrupt on rising and falling edges */ EXTI_ClearITPendingBit(EXTI_Line16); EXTI_InitStructure.EXTI_Line = EXTI_Line16; EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising_Falling; EXTI_InitStructure.EXTI_LineCmd = ENABLE; EXTI_Init(&EXTI_InitStructure); PWR_PVDLevelConfig(PWR_PVDLevel_7); /* Enable the PVD Output */ PWR_PVDCmd(ENABLE); #endif } { /* Enable the PVD Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = PVD_IRQn; NVIC_InitStructure.NVIC_IRQChannelPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); } |
【STM32F0开发日志/评测/笔记】+互补PWM波的产生
STM32F030 PB14和PB15无法输出PWM求助
【STM32F030探索套件】序列之五 外部中断
【STM32F0开发日志---二】+ucosii.2.92移植在STM32F030
上传个STM32F0+5110+内部温度传感器的菜鸟实例
【STM32F030探索套件使用问题】STM32F030 SPI方式驱动ST7565LCD失败
求一份STM32F051 I2C驱动LCD 12864的例程
STM32F0 M0 向结构体赋值进入HardFault异常
STM32F0 ADC-DMA方式采集2路数据时出现问题
STM32F030C8T6,TIM16定时慢很多问题?
下面是一段函数提取出来的,中断函数:
void PVD_IRQHandler(void)
{
Puts("\r\n PVD_IRQHandler");
if(EXTI_GetITStatus(EXTI_Line16) != RESET)
{
Puts("\r\n PVD_IRQHandler");
EXTI_ClearITPendingBit(EXTI_Line16);
}
}
你初始化的时候应该把中断相关配置好,比如上面的优先级。
还有,你是直接掉电的么?我估计串口没来得及发数据就没电了,或者你用可调电源试试,从3.3V电调到2.5V看看。
评分
查看全部评分