BOD Configuration & Interrupt

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

BOD Configuration & Interrupt

1,820件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by scriptr on Wed May 04 10:49:15 MST 2011
Hi,

To measure the battery remaining, we like to configure BODCTRL to get an interrupt. However we couldn't succeed.

What we do is;
LPC_SYSCON->BODCTRL = 0x1C
We hope to get an interrupt when the voltage decreases under 2.8 V.

But our following method is not called as an interrupt;

void BOD_IRQHandler(void) {}

Could you help us?

Thanks
0 件の賞賛
返信
6 返答(返信)

1,715件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Thu May 05 11:45:48 MST 2011

Quote: Zero

Whenever I'm working with interrupts, I'm looking at NVIC chapter to see if there's an NVIC to enable.:)



Good tip.:)  Spent a lot of time figuring out problems like this.
0 件の賞賛
返信

1,715件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu May 05 03:38:17 MST 2011

Quote:

3.5.26 BOD control register
The BOD control register selects four separate threshold values for sending a BOD interrupt to the [COLOR=Red]NVIC[/COLOR] and for forced reset. Reset and interrupt threshold values listed in Table 32 are typical values...

Unfortunately the user manual doesn't explain this explicitly, NVIC is just mentioned.
Whenever I'm working with interrupts, I'm looking at NVIC chapter to see if there's an NVIC to enable. After reading your questions it sounds clear to me that there's something wrong with interrupt enabling and my own (working) BOD sample for LPC11C14 showed me that there's really an NVIC to enable:)
0 件の賞賛
返信

1,715件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by scriptr on Thu May 05 00:51:06 MST 2011
Actually we didn't. Although we read the documents carefully, we didn't see any tip about this call; but BODCTRL and BOD_IRQHandler.
Can you tell us where we can find that kind of tips, please?
Thanks.
0 件の賞賛
返信

1,715件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed May 04 14:19:20 MST 2011
Did you enable the interrupt?

    NVIC_EnableIRQ(BOD_IRQn);                //enable BOD INT
0 件の賞賛
返信

1,715件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by scriptr on Wed May 04 13:29:43 MST 2011
No,it is a LPC1114
0 件の賞賛
返信

1,715件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Wed May 04 13:26:44 MST 2011
Are we talking about LPC1343 ?
0 件の賞賛
返信