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.

CC3235MODSF: CC3235, EVM example-Power management, some question about code configure and after LPDS wakeup

Part Number: CC3235MODSF


hi 

I am modifying some code based on CC3235 EVM example(power manage FreeRTOS). 

i see there are some function to configure WLAN power policy.

configDuration((uint8_t *)"LSI", (uint8_t)LSI_MIN_DURATION_IN_MSEC, (uint16_t)LSI_MAX_DURATION_IN_MSEC, &PmPolicyParams); 

sl_WlanPolicySet(SL_WLAN_POLICY_PM, SL_WLAN_LONG_SLEEP_INTERVAL_POLICY, (uint8_t *)&PmPolicyParams, sizeof(PmPolicyParams))

IOT mode configuration is similar with LSI mode.

in always-LSI mode , whatever I configure duration time is, it seems not affect with current. furthermore, after I configure duration time 100ms, and change Sleep to 100 second, and find it disconnect with AP after some seconds. not always connected with AP!!?

could you help to explain 

1. what's difference between LSI and IOT mode?

2. what means of this duration time configuration?

3. where can i find all the API function description?

4. after wakeup from LPDS, are the previous variable and task(thread) still available? BTW, after wakeup from LPDS, I add some code to continue to work, but it always report sl_Start Failed.

thank you very much.

Zhu JQ

  • Hi,

    1. LSI is a proprietary method that puts the device in a longer sleep periods then the 802.11 spec allows (i.e. more than DTIM). Since it is not official - broadcast packets may get lost during the sleep interval.

    IOT Law Power is a new WFA standard to allow IOT device to sleep longer (without losing any packets) - it will work only if the AP supports this (see details in the programmer's guide).

    2. This is the time you want the device to sleep between beacons reception (it is rounded to the nearest DTIM interval). Details can be found the  the Power Management document and Programmer's guide .

    3. see chapter 15 in the programmer's guide.

    4. Yes status is kept in LPDS. If you are connected the sl_Stop will fail because the NWP is still on (only the host is going to low power). You cna check return code of the failure to verify this.

    Br,

    Kobi

  • Hi Kobi

    thank you. 

    could you give me a accurate definition about which AP can support IOT or LSI? such as AP support 802.11ah? 802.11ax? or ?

    how does customer choose AP for IOT or LSI supporting? what description or sign is there on the AP?

    for the sl_Start Failed issue, I stop NWP and restart , it is ok. definitely as you said.

    thanks.

    Zhu JQ

  • hi kobi

    another question is in this example, i want to add a function which implement user can input remote IP address, when device is in intermittently connection, sending data to remote TCP server.

    if using static valuable just like example, it is ok that can send prepared data to remote PC. 

    if using input IP address, i save it to Retention Register because it is lost when CC3235 enter hibernate, the code is below

    setHibRetentionReg(gDestIPADDR);          /// this like it uint_32 gDestIPADDR = SL_IPV4_VAL(192,168,43,123);  here 192... is got from input.

    and wakeup from Hibernate mode, get this valuable using below code.

    gDestIPADDR = getHibRetentionReg();

    but when running code, the firmware running processor cannot wakeup from Hibernate, after first sending data to remote PC, and enter Hibernate, then it is wakeup from watchdog reset!!!!!

    why?

    ******************************************/

    here I set return 1 is from RTC wakeup, return 2 is from GPIO wakeup, return 0 is other. then I modify to return(MAP_PRCMSysResetCauseGet()); find actually, it return 5???  it is PRCM_WDT_RESET .

    ******************************************/

    int32_t isWokenFromHib(void)
    {
    #ifdef __MSP432P401R__
    /* read from retention the cause for wakeup */
    return(0);
    #elif CC32XX
    if(MAP_PRCMSysResetCauseGet() == PRCM_HIB_EXIT)
    {
    if (MAP_PRCMHibernateWakeupCauseGet()== PRCM_HIB_WAKEUP_CAUSE_GPIO)
    {
    return(2);
    }
    return(1);
    }
    else
    {
    return(MAP_PRCMSysResetCauseGet());
    // return(0);
    }
    #endif
    }

    ******************************************

    i have another question about retention register. i cannot find where describe detail of this register, and where is its address?  could you give me a link? and point the which page? thank you very much.

    #define HIB_RETENTION_REGISTER          (0x4402FC20)

  • LSI is proprietary method that doesn't depend on the AP - the risk is losing packets, specifically broadcasts and it can can increase the number of disconnections (long interval will work better against some AP and environments so it is up to you to optimize it).

    Support of IOT Low Power consist of different features (see in the programmer's guide) that the AP may or may not support (it is not related the ah and ax standards).

  • the re is a difference between going to LPDS where the MCU state is retained (which enables you to maintain connection to the AP and maintain the TCP socket) and Hibernate which causes the MCU to reset (thus connection to the AP needs to be re-established and same for the socket operations). 

    The Power measurement show both the use Always Connected (with LPDS) and Intermittently connected (using hibernate).

    The 2nd will be preferred typically when the wakeup interval of the device is more than a minute. 

  • thank you, Kobi

    understood for IOT and LSI description. actually, i think, for these two mode, customer difficultly to choose their AP to support it. i have a AP (TP-Link) support 802.11ax. but it don't also support IOT and LSI mode.

    ok. we will focuse on intermittently connection mode.

    if I use Hibernate mode for interval working mode, how do I save remote IP address?

    in EVM example, working mode is saved in retention register as uint8_t type, it work well.

    but I save a uint32_t type data, a big data (C0A82B7B) in it. it will cause WDT reset wakeup, not from Hib wakeup.

    do you give me Link which describe this register? i cannot find it.  even you mentioned "programmer's guide", i dont know which doc you said.

    i have the below doc beside CC3235 SPEC.

    1. SimpleLinkTm Wi-Fi® CC3x20, CC3x3x Network Processor User’s Guide
    2. Application Report SimpleLinkTm Wi-Fi® CC3x3x Networking Subsystem Power Management
    3. SimpleLinkTm Wi-Fi® CC323x Technical Reference Manual
    4. SimpleLink SDK Power Management: MSP432,MSP432E4, CC13xx/CC26xx, and CC32xx User’s Guide

    thank you.

  • LSI will not appear in any AP - it is a proprietary feature of SimpleLink.

    What I refer to Programmer's guide (provided the link in my first answer) is what you refer in the first document listed.

    Details on the HIB retention register can be found in the TRM (ref-3 in your list). The registers are not described directly but you can access them through:

    void PRCMOCRRegisterWrite(unsigned char ucIndex, unsigned long ulRegValue)

  • Hi Kobi

    thank you. this API work well. and now, I can save data to retain register.

    so in EVM example, maybe there is some issue in save a large data. I don't know if 0x4402FC20 address refer to retain register 0. if yes, you can see my below test result of retain register 0.

    ////////////////////////////////EVM example code/////////////////////////////////////

    #define HIB_RETENTION_REGISTER          (0x4402FC20)

    void setHibRetentionReg(uint32_t val)
    {
    #ifdef __MSP432P401R__
    /* write to retention register */
    #elif CC32XX
    HWREGB(HIB_RETENTION_REGISTER) = val;
    #endif
    }

    ///////////////////////////////////////////////////////////////////////////////////////////////////

    Another,  I save this C0A8 2B7B (192.168.43.123) data to retain register 0, it always read 40A8 2B7B. the highest bit is always lost. I thought it was data type wrong. but after I directly run MAP_PRCMOCRRegisterWrite(0,0xFFFFFFFF); it read out to 0x7FFFFFFF

    so I try to use retain register 1 to save and read, yes, it read out to 0xFFFFFFFF. it is ok. Same code, different result with using retain register 0 and 1.

    just for your reference. thank you for your helping.

    Zhu JQ