LPC 18xx Brown Out Help

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC 18xx Brown Out Help

1,017 次查看
jakeweiner
Contributor I

Hi all,

I'm quite new to brownouts and at work I am required to implement a feature to detect if our LPC1837 device falls below a certain threshold on startup. I was just wondering if this would be the correct way to implement such a feature

// Set BOD Threshhold //

if (detect>=0 && detect<=3){

   LPC_CREG->CREG0 &= ~(3<<8);
   LPC_CREG->CREG0 |= detect<<8;

}

Chip_EVRT_Init();
Chip_EVRT_ConfigIntSrcActiveType(EVRT_SRC_BOD1,EVRT_SRC_ACTIVE_FALLING_EDGE); // now im not sure exactly which option to select here, I figured i want to detect the falling edge?
Chip_EVRT_SetUpIntSrc(EVRT_SRC_BOD1,ENABLE);
NVIC_EnableIRQ(EVENTROUTER_IRQn);

Now the problem that I am having is that despite clearing the event status with

LPC_EVRT->CLR_STAT &= (0x01UL<<EVRT_SRC_BOD1);;

I am stuck in my event handler routine. Just wondering if this would be a problem with my chip (I cant measure the internal voltages) or, more likely, something wrong with my code.

Any help would be greatly appreciated.

Thanks in advance,

Jake

标签 (2)
标记 (3)
0 项奖励
回复
1 回复

719 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Jake,

Could you share your project?

Thanks in advance!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 项奖励
回复