PVD through EXTI Line detection not triggered!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-04-18 12:29 AM
Posted on April 18, 2013 at 09:29
Hi
In STM32F103RC, Configured the interrupt for PVD through EXTI line 16, When the PVDO output bit is on in PWR_CR, but interrupt not triggerd! Thanks #pvdo-interrupt
Labels:
- Labels:
-
Interrupt
This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-05-09 6:45 AM
Posted on May 09, 2013 at 15:45 Hello, Try to share some code for check. Did you tried different voltage thresholds? Regards, ST.MCU
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-05-10 4:01 PM
Posted on May 11, 2013 at 01:01
// Enable the EXTI16 (PVD) Power Supervisor Interrupt
// EXTI16 rising edge for falling voltage, falling edge for rising voltage on PVD
#if (CPUID_PARTNO == CPUID_CORTEX_M3 && CPUID_VARIANT == 0) // for STM32F1xx
PWR_PVDLevelConfig(PWR_PVDLevel_2V9); // 2.9V falling to trigger powerfail
#else
PWR_PVDLevelConfig(PWR_PVDLevel_7); // 2.9V falling to trigger powerfail
#endif
PWR_PVDCmd(ENABLE); // enable PVD
NVIC_InitStructure.NVIC_IRQChannel = PVD_IRQn; // PVD programmable voltage detect
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = BKPDEV_PVD_PRIORITY;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
EXTI_ClearITPendingBit(EXTI_Line16); // clear pending IRQs
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
EXTI_InitStructure.EXTI_Line = EXTI_Line16; // set up irq trigger
EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; // trigger power rising edge (voltage drop)
EXTI_InitStructure.EXTI_LineCmd = ENABLE; // alert if power status changes
EXTI_Init(&EXTI_InitStructure);
This ishow I do it on F1/F2/F4.
Jack Peacock
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-11 3:47 AM
Posted on May 11, 2014 at 12:47
Hello
Did you found where is a problem?I have same issue with 103RBT6, same code as above.I can't even get any success with:if ((PWR->CSR & PWR_FLAG_PVDO) != (uint32_t)RESET)ThanksOptions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-05-11 3:15 PM
Posted on May 12, 2014 at 00:15
Problem solved. With source code from PVD example it just works.
Thanks