Dear NXP:
我在实验NXP的LPC802的功耗问题的时候有疑问,测试下来功耗挺高,power-down模式都在60uA,我整个板子上只有一个LPC802的芯片,代码如下:
void Delay_ms(uint16_t ms)
{
uint16_t i,j;
for(j=0;j<ms;j++)
{
for(i=0;i<1000;i++)
{
}
}
}
int main(void) {
unsigned int k, temp;
char buff[30] = "WUSRCREG content is 0xYZ\n\n\r";
uint32_t * addr = (uint32_t *)LPC_IOCON_BASE;
LPC_SYSCON->SYSAHBCLKCTRL[0] |= (GPIO0|IOCON);
Delay_ms(10000);
LPC_IOCON->PIO0_16=0x08;
LPC_IOCON->PIO0_17=0x08;
LPC_IOCON->PIO0_13=0x08;
LPC_IOCON->PIO0_12=0x08;
//LPC_IOCON->PIO0_5=0x08;
//LPC_IOCON->PIO0_4=0x08;
LPC_IOCON->PIO0_2=0x08;
LPC_IOCON->PIO0_3=0x08;
LPC_IOCON->PIO0_11=0x08;
LPC_IOCON->PIO0_10=0x08;
LPC_IOCON->PIO0_15=0x08;
LPC_IOCON->PIO0_1=0x08;
LPC_IOCON->PIO0_9=0x08;
LPC_IOCON->PIO0_8=0x08;
LPC_IOCON->PIO0_7=0x08;
LPC_IOCON->PIO0_0=0x08;
LPC_IOCON->PIO0_14=0x08;
while(1) {
Setup_Low_Power();
// Clear the deep PD pin wakeup source flags in WUSRCREG
LPC_PMU->WUSRCREG = 0xFF;
// Set the SleepDeep bit
SCB->SCR |= (1<<2);
// PCON = 3 selects Deep power-down mode
LPC_PMU->PCON = 0x3;
// Wait here for wakeup pin.
__WFI();
while(1);
} // end of while(1)
} // end of main
Hi,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
我就是用这个历程的,板子是MCU在我们自己板子上焊接了一个,不会有什么问题的,就一个芯片,其他都没有,你们在你们的demo上测试过?我也在你们的demo跑过,LPC804的开发板,但是功耗比单芯片更高。
Hi ,
测试板: OM40000 LPC802评估板
例程:PMU_Modes例程
我这边测试一下,功耗没有达到预想的水平,代码确有缺陷,
要想达到数据手册的功耗水平,还需在原代码的基础上增加如下设置:
Hope it helps.
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi jeremyzhou:
你的代码可以上传吗
Hi ,
目前只有PMU_Modes例程,优化是需要自己根据这两条要求来做的。
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Delay_ms(10000);
LPC_IOCON->PIO0_16=0x08;
LPC_IOCON->PIO0_17=0x08;
LPC_IOCON->PIO0_13=0x08;
LPC_IOCON->PIO0_12=0x08;
//LPC_IOCON->PIO0_5=0x08;
//LPC_IOCON->PIO0_4=0x08;
LPC_IOCON->PIO0_2=0x08;
LPC_IOCON->PIO0_3=0x08;
LPC_IOCON->PIO0_11=0x08;
LPC_IOCON->PIO0_10=0x08;
LPC_IOCON->PIO0_15=0x08;
LPC_IOCON->PIO0_1=0x08;
LPC_IOCON->PIO0_9=0x08;
LPC_IOCON->PIO0_8=0x08;
LPC_IOCON->PIO0_7=0x08;
LPC_IOCON->PIO0_0=0x08;
LPC_IOCON->PIO0_14=0x08;
LPC_GPIO_PORT->CLR0 = 0x00000; // Clear P0.13, P0.14 to '00'
LPC_GPIO_PORT->DIR0 = 0xFFFFF; // P0.13, P0.14 to output、
因为我这样操作了, LPC_SYSCON->SYSAHBCLKCTRL[0] &= ~(GPIO0|IOCON);
但是还是没下去功耗
Hi ,
请参考附件内低功耗工程。
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi jeremy:
thank you,but why the code have so many problems,do you know that? I do not know why such a simple power problem can be so long without result. Please work hard.
Hi ,
你确认一下Options>General Options>Target里,MCU是否正确。
我这边没有任何错误。
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------