Other Parts Discussed in Thread: CC3235MODASF
Hi,
We have a few thousands devices equipped with the cc3200 in the field. In most infrastructure they are working flawlessly, but at a few customer we have a low occurence bug which consumes the battery in around a day. I'my trying to understand the cause of the bug.
Our battery powered device will typically wake up from hibernate using slow clock, connect to the last access point (using fast connect), connect to an http server, do a few requests and go back to hibernate for a duration between a few second and 24 hours. When the bug happens, we see that the device does not connect at the expected timing, but drains the battery very fast. When our battery lever watcher circuit resets the cc3200, it works flawlessly afterwards.
The frequency of the bug is typically between never (at some customer) and once every few week (at some "lucky" customers).
I left one device connected for 5 weeks to a computer to log our uart output to see what happens when the bug happens. The bug happened once in those 5 weeks. The log just shows a normal output as if it was correctly going in hibernate for 2201 seconds but did not wake up in the next 6 days until I reset it (Device was powered by usb)
Last UART output:
Now=349851932, RTCnext_wakeup=422002766
Going to hibernate, next wake up scheduled in 2201 seconds
Bye, bye
I suspect that the device does not properly go in hibernate. But I currently do not have any clues as to why.
See our hibernate code:
MAP_PRCMHibernateIntervalSet(next_wakeup_ullTicks); MAP_PRCMHibernateWakeupSourceEnable(PRCM_HIB_SLOW_CLK_CTR | PRCM_HIB_GPIO4); MAP_PRCMHibernateWakeUpGPIOSelect(PRCM_HIB_GPIO4, PRCM_HIB_HIGH_LEVEL); UART_PRINT("Bye"); Utils_SpiFlashDeepPowerDown(); UART_PRINT("bye\r\n\r\n\r\n"); MAP_UtilsDelay(20000); MAP_PinTypeGPIO(PIN_55, PIN_MODE_0, false); MAP_GPIODirModeSet(GPIOA0_BASE, 0x2, GPIO_DIR_MODE_OUT); GPIO_IF_Set(1, GPIOA0_BASE, 0x2, 0); MAP_PinTypeGPIO(PIN_57, PIN_MODE_0, false); MAP_GPIODirModeSet(GPIOA0_BASE, 0x4, GPIO_DIR_MODE_OUT); GPIO_IF_Set(2, GPIOA0_BASE, 0x4, 0); MAP_UtilsDelay(8000); // this ensures pin TDO is Hi-Z when entering hibernate HWREG(0x4402FC14) |= 0x100; HWREG(0x4402FC14) &= ~0x2; // // Enter HIBernate mode // MAP_PRCMHibernateEnter(); UART_PRINT("We should not be here");
Service pack: 2.12.2.8.31.1.5.0.10.1.0.3.37
What I plan next:
- try with sdk 1.5.0 and corresponding service pack
- try to increase communications to reproduce the bug faster
My questions:
- Any ideas if I do something obviously stupid in my hibernate code?
- Any suggestion on how to debug such an issue?
- Would you be able to read a very long nwp log?
Note: I have similar issues (Loss of communication until reset due to empty battery) with cc3235modasf on another product, but I have not yet reproduced it with uart so will keep this separated for now.
Happy thanksgiving ; )
Cédric