This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200: Device does not enter/exit hibernate

Part Number: CC3200
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

  • I'm not familiar with a similar issue and your code seems ok.

    Do you have any data regarding on the current consumption in this case?

    Do you have a watchdog timer enabled? (it may save the system in case the device won't enter hibernate).

    I'm not sure about the NWP log but we can try, although it seems like an host issue.

  • With the duration of the "blackout" (~65h) and the battery size (usable ~6000mAh), we can estimate the consumption of the cc3200 at around 100mA. 

    Yes watchdog is set and works fine. I just tested it now by adding delays just before MAP_PRCMHibernateEnter.

    During my test I realized that the UART_PRINT("We should not be here") will never be shown due to the change of mode just above. 

    What could typically cause this consumption and the failure of the watchdog?

  • are you turning the NWP off (st_Stop(200)) before getting into hibernate?

    maybe you get some kind of exception during the hibernate sequence. This can explain the message. I'm not sure it can explain the missing Watchdog Reset.

    I will try to check internally if anyone is familiar with similar issues and/or with debug options. 

  • Also where did you find the definition of the following register (0x4402fc14)? it is not in the TRM. 

    HWREG(0x4402FC14) |= 0x100;
    HWREG(0x4402FC14) &= ~0x2;

    I assume it isn't causing the issue but maybe it would be good to remove it.

  • sl_stop(200) was called when the bug occured.

    To be complete, sl_stop was sometime called, and sometime not called depending on what happened before. I just fixed this by always calling it.

    The register was documented in an old document:

    http://software-dl.ti.com/ecs/CC3200SDK/1_3_0/exports/CC3200-SDK_Release_Note.pdf

    I can look how to do the same thing using gpio lib.

    Thanks for checking for similar issues and/or debug options!

     

    One additional info is that it seems that the bug started when switching from sdk1.3 & sp 2.10 to sdk 1.5 & sp2.12. There were also a few changes on my side, the main being a change of connection policy from "auto" to "fast + auto".

    I will go to our customer next week to install a few variants to try to pinpoint the issue. I would gladly take any advice regarding additional logging/debug before.

    - 1 device with problematic firmware and sp and equiped with nwp log

    - 1 device with old firmware and sp 2.10

    - 1 device with new firmware with some fix and sp 2.14

  • ok, thanks.

    the cc3200 is used for so much time and we are not familiar with similar issue. I really hope you can pinpoint the issue. 

  • Yes hopefully the devices i'll install on Wednesday shall help.

    One question regarding the watchdog, I just noticed that it was set to ~0 which I understand to be the lowest priority.

    Is my understanding correct that the interrupt priority setting will only impacts the callback function, and that even if it was completely pre-empted the watchdog will perform the reset?

  • what do you mean by "~0"? Can you provide the code?