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.

CC3220SF: SW reset / reboot of CC3220SF

Part Number: CC3220SF
Other Parts Discussed in Thread: SEGGER, CC3200

Dear TI,

in my project I am observing randomly and not very often (even now with specific SW it is reproducible in 100% cases)
situation when after applying OTA FW update and calling 

PRCMHibernateCycleTrigger();

my board with CC3220SF does not reboot. When checking with debugger, it calls all code from PRCMHibernateCycleTrigger(); and "freezes".
It does not boot after.

My first question is related to HW: shall I check something specific? I am referring to this thread: 
https://e2e.ti.com/support/wireless-connectivity/wifi/f/wi-fi-forum/795818/cc3220mod-mcu-reset-after-a-local-ota-update

If I will exclude that this is HW issue, I will need to know what is the correct way to perform SW reset.
I have found those related threads giving next options to trigger SW reset:

https://e2e.ti.com/support/wireless-connectivity/wifi/f/wi-fi-forum/919422/launchxl-cc3235sf-ota-sys-mcuflashimg-bin-with-sl_fs_write_bundle_file-doesn-t-take-effect

https://e2e.ti.com/support/wireless-connectivity/wifi/f/wi-fi-forum/896487/cc3220moda-soc-freezes-on-rebooting-when-it-invokes-method-prcmmcureset

Thank you for support in advance!

Regards
Jiří

  • Hi Jiří,

    A few questions:

    • How looks your all reboot code after OTA? For example I use this code for reboot after OTA I haven't seen any issue ever:

    //*****************************************************************************
    //* DeviceReset(int stop)                                                     *
    //*                                                                           *
    //* restartovani CC3220 SoC                                                   *
    //*                                                                           *
    //*   stop ... typ restartu:                                                  *
    //*            0 - restart bez deaktivace NWP. Tento zpusob restartu neni     *
    //*                prilis bezpecny. Pro nektere situace muze byt uzitecny.    *
    //*            1 - restart s deaktivaci NWP a pozastavenim sitovych tasku.    *
    //*                Pouziti tohoto zpusobu by melo byt bezpecne a z toho       *
    //*                duvodu preferovane.                                        *
    //*                                                                           *
    //*****************************************************************************
    static void DeviceReset(int stop) {
    
      if (stop != 0) {
        // cekani na dokonceni aktualni komunikace
        osi_Sleep(200);
      }
    
      // nastaveni WLAN na stav idle (blokovani sitlovych tasku)
      WLANState = WLAN_STATE_IDLE;
      // inkrementace cisla session
      WLANSessionNr++;
    
      // cekani na zaparkovani sitovych vlaken
      osi_Sleep(100);
    
      if (stop != 0) {
        // vypnuti NWP
        sl_Stop(200);
      }
    
      // kompletni restart SoC pomoci HIB
      MAP_PRCMHibernateIntervalSet(330);
      MAP_PRCMHibernateWakeupSourceEnable(PRCM_HIB_SLOW_CLK_CTR);
      MAP_PRCMHibernateEnter();
    }

    • What SDK version and ServicePack do you use?
    • Do you see same issue with TI OTA examples?
    • How is connected nRESET pin on module?

    Jan

  • Hello Jan!

    Thank you for your fast response.

    • Our code for SW reset looks like this:

    void power_cycle(void)
    {
        notification_send(...);  // here we are letting know other parts of system that we go down
                                           // actually here we only call httplib_stop_listening(..) function

        sleep(8); /* Make sure to leave time for other components to process notification */

        if (b_nwpRunning)      // NWP may not be running because it is just being restarted
        {
            if (sl_Stop(200) != SL_RET_CODE_OK)
            {
                ASSERT_ALWAYS();
            }
        }

        PRCMHibernateCycleTrigger();

        ASSERT_ALWAYS();   /* Should not get here */
    }

    • SDK version we are using: TI CC32xx SDK v3.20.0.6 (with some local modifications); ServicePack version: sp_3.13.0.3_2.0.0.0_2.2.0.6
    • I have not tried TI OTA example
    • nRESET pin is floating (on my place only connected to Segger J-link debugger via J-TAG cable) - but we are observing this issue also without connected debugger

    Regards
    Jiří

    PS: I cannot put C code formatted, I have got this error message

    Access Denied

    You don't have permission to access "">e2e.ti.com/.../configure on this server.

    Reference #18.5e1d4117.1616060937.1077f470

  • Hi Jiří,

    I don't see anything wrong inside your code and usage PRCMHibernateCycleTrigger() API. My only idea is try to add small delay between sl_Stop() and hibernation API. For test purpose please try to use latest ServicePack as well.

    If you will not be able solve your issue by steps above, next step will be capture NWP log (SWRU455 chapter 20). You will need to wait for TI response, because I don't have available tool for analysing NWP log.

    Jan

  • Hello Jan,

    I was about to try modification from

    PRCMHibernateCycleTrigger();

    to

    PRCMHibernateIntervalSet(330);
    PRCMHibernateWakeupSourceEnable(PRCM_HIB_SLOW_CLK_CTR);
    PRCMHibernateEnter();

    as it looks like this helps. But it is hard to verify this change. In my case it works
    well, but more use case testing is needed.

    So I am not sure if I should just add that mentioned small delay (200ms?) or if
    I should also change to the reboot procedure above.
    I will test it in 2 steps. First I will just add delay and see what will be the result.

    We cannot use latest Service Pack because we cannot downgrade it (relevant for devices delivered outside company)
    and I need to test my fix widely as it seems to be randomly happening usually.

    I will record NWP log in any case, since I have SW that is failing on my place each time.

    Regards
    Jiří

  • Hi Jiří,

    I have closely looked into PRCM hibernation APIs in driverlib. I think at my code PRCMHibernateIntervalSet() and PRCMHibernateWakeupSourceEnable() didn't do their job. I use that code from my previous project with CC3200 and I did not realize that such code is inside driverlib PRCMHibernateEnter() API already.

    Maybe adding this can fix issue due to prolonging time between sl_Stop() and hibernation reset. 200ms sounds for me reasonable.

    Jan