Problem when building Brownout Detector

OP #6463087
Rate this post
• ▲ useful
▼ not useful
Dear all,

here I have some questions about the brownout detector. I haven't any 
experience of interrupt, maybe I've done it with some dummy thought.

I have an ATMEL SAMC21XPLAINED Board in hand, and i want to try the 
brownout detection interrupt. First I configure the VDDBOD in the eFuse 
(Enable, Hysteresis, Level). From the generated atmel start project 
source code, I found a system_handler, as said in commends, which is for 
the interrupt of Power manager, Main clock, osc controller, protection 
access controller and SUPC(supply controller). The SUCP is theoretically 
what i need for the brownout detection.

Then I built a System_handler function, aiming to store the test data 
into EEPROM and see a short blink of LED, as below:

void SYSTEM_Handler()
{
  RWW_FLASH_BOD();
        gpio_toggle_pin_level(LED0);

}

The current situation is, every time when I cut off the supply, and want 
to turn it on again to check its EEPROM. Then I found the LED blinks 
after the power on, that means the SYSTEM_Handler detect in the 
meanwhile the restart. My assumption is that the mentioned interrupt 
source above have the same priority. In this case how can I set that the 
Handler just about the Brownout, not others? Or if I understand it 
totally wrong, how should I configure and call the Brownout Function?

Everyone who interested in this

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.