power down control problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

power down control problem

521 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Vaque on Mon Mar 28 11:03:52 MST 2016
Hi all;

I have one problem. I am waking up one lpc824 from power down mode with WKT and with Pin. It worked well until I added this:
/* MRT Initialization and disable all timers */
Chip_MRT_Init();
for (mrtch = 0; mrtch < MRT_CHANNELS_NUM; mrtch++) {
Chip_MRT_SetDisabled(Chip_MRT_GetRegPtr(mrtch));
}

/* Enable the interrupt for the MRT */
NVIC_EnableIRQ(MRT_IRQn);

delayMRTmicros(1000000);

while ( 1 ) {
for(i=0; i<20; i++)
msj=0;
strcpy(msj, "paso\r\n");
Chip_UART_SendBlocking(LPC_USART0, msj, sizeof(msj) - 1);

/* measure! */
readDHT11(&measure);

/* message ! */
for(i=0; i<20; i++)
msj=0;
itoa(measure.humidity, msj, 10);
Chip_UART_SendBlocking(LPC_USART0, msj, sizeof(msj) - 1);
Chip_UART_SendBlocking(LPC_USART0, "-hum\r\n", 6);

for(i=0; i<20; i++)
msj=0;
itoa(measure.temperature, msj, 10);
Chip_UART_SendBlocking(LPC_USART0, msj, sizeof(msj) - 1);
Chip_UART_SendBlocking(LPC_USART0, "-temp\r\n", 7);

/* Indicate entering power down state */
delayCount(2);
Chip_PMU_PowerDownState(LPC_PMU);
}


Where can I begin to study the problem?

Thanks all. (I attach the files :))

Original Attachment has been moved to: dht11.c.zip

Original Attachment has been moved to: dht11.h.zip

Original Attachment has been moved to: redSensores.c.zip

Labels (1)
0 Kudos
3 Replies

289 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

289 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Vaque on Tue Mar 29 05:10:47 MST 2016
A Vaque always pays his debts ;)
0 Kudos

289 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Vaque on Tue Mar 29 04:37:29 MST 2016
Hi! I find the error.

The error was the use of __WFI() into delayMRTmicros(). I don't know exactly what happened but it must be affecting.
Does anyone know how affects __WFI() to power-down mode?

Regards.

pd: the code of dht11 its to bad. I will it well to put here.

0 Kudos