Oct 30, 2018
04:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 30, 2018
04:29 AM
I want to detection the supply voltage, and perform some action when the voltage drops.
The problem is that I can't find the handler (is that NMI_handler?) when brown-out detected.
The problem is that I can't find the handler (is that NMI_handler?) when brown-out detected.
//Enable power monitoring control register for brown-out detection.
XMC_SCU_POWER_EnableMonitor(0x01, 0x80);
//enable a trap source
XMC_SCU_TRAP_Enable(0X20);
3 Replies
Oct 30, 2018
06:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 30, 2018
06:14 AM
Hi,
Yes, it is NMI handler in the default case.
Regards,
Jesus
Yes, it is NMI handler in the default case.
Regards,
Jesus
#include "xmc_scu.h"
void NMI_Handler(void)
{
__BKPT();
}
int main(void)
{
XMC_SCU_TRAP_Enable(XMC_SCU_TRAP_BROWNOUT);
XMC_SCU_POWER_EnableMonitor(130, 1);
/* Placeholder for user application code. The while loop below can be replaced with user application code. */
while(1U)
{
}
}
Oct 30, 2018
06:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 30, 2018
06:54 PM
Thanks, but I didn't see the definition of void NMI_Handler(void) in the project.
Should I define it myself, or set in one of the APPs somewhere?
Should I define it myself, or set in one of the APPs somewhere?
jferreira wrote:
Hi,
Yes, it is NMI handler in the default case.
Regards,
Jesus#include "xmc_scu.h"
void NMI_Handler(void)
{
__BKPT();
}
int main(void)
{
XMC_SCU_TRAP_Enable(XMC_SCU_TRAP_BROWNOUT);
XMC_SCU_POWER_EnableMonitor(130, 1);
/* Placeholder for user application code. The while loop below can be replaced with user application code. */
while(1U)
{
}
}
Jun 15, 2023
11:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 15, 2023
11:42 AM
Hi,
We want to enable brownout detection as well.
Is there any guidance in terms of setting the threshold value? Our Vdd is 3.3 Volt. What should be the threshold value then? We are thinking of triggering brownout if the supply goes below 3V. Any feedback/suggestion?
Btw, how many micro or milliseconds do we have left once we detect the brownout? Our MCU is XMC4800-144 pin.
Thank you very much in advance,