lpcware

Brown out detect

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by cyberstudio on Fri Jul 19 12:44:05 MST 2013
I am trying to use brown out detect to do a wait loop until voltage is above the BOD threshold before doing some task. So the actual BOD interrupt is not enabled but I am polling the BOD pending interrupt bit in NVIC.


while (0 != NVIC_GetPendingIRQ(BOD_IRQn))
NVIC_ClearPendingIRQ(BOD_IRQn);


Would this work? Will BOD pending bit immediately get high again if the supply voltage remains below the BOD threshold?

The pending bit certainly won't go away on its own, it seems, so this would hang:


while (0 != NVIC_GetPendingIRQ(BOD_IRQn));


Thanks in advance.

Outcomes