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.

  • Resolved

can CC3200 LPDS mode wake up by UDP packet?

Prodigy 110 points

Replies: 8

Views: 744

Hi,

I run a UDP server on CC3200 and enter LPDS mode waiting for UDP packet. (CC3200 is AP mode)

wake up source only network

it can't wake up when I sent UDP packet to it, but connecting to it can!

Can CC3200 LPDS mode wake up by UDP packet?

thanks~

  • Hi Markii,

    Yes, CC3200 in LPDS can wake up by UDP packets.
    Please check out the 'idle_profile' example provided in SDK.

    Regards,
    Ankur

    ----------------------------------------------------------------------------------------------------------
    Please click the 
    Verify Answer button on this post if it answers your question.
    ----------------------------------------------------------------------------------------------------------

  • In reply to Ankur Baranwal:

    Hi Ankur,

    I had referenced "idle_profile_nonos" example.
    below is part of my code

    while(1)
    {
    cc_idle_task_pm(); //enter LPDS mode
    DataRec();
    }

    this while loop is in main, all I want to do is if there is nothing from internet then enter LPDS mode.
    DataRec function code as below:

    void DataRec()
    {
    int datalen;
    datalen = sl_RecvFrom(iSockID, g_cBsdBuf, BUF_SIZE, MSG_DONTWAIT, ( SlSockAddr_t *)&sAddr, (SlSocklen_t*)&iAddrSize );
    if(datalen > 0)
    CommandPaser(datalen); //analysis receiving data
    }

    only network connection can wakeup device and go to DataRec()
    when I sent UDP socket to it, nothing happened
    it seems still at LPDS mode
    would you please give me some hints why it doesn't work
    thanks~
  • In reply to Markii Cheng:

    Hi Markii,

    Now I understand your problem.
    In code

    while(1)
    {
    cc_idle_task_pm(); //enter LPDS mode
    DataRec();
    }

    calling the 'cc_idle_task_pm()' will put the device in LPDS mode and the device is not waiting for any data hence can't wake up once the data is received.

    Please note if using the blocking socket, call to API 'sl_RecvFrom()' will be blocking ou can use the hook provided in the host driver to put the system in LPDS mode while using the blocking API. Please checkout the function 'SimpleLinkSyncWaitLoopCallback()' in "idle_profile_non_os" example.

    so your loo[ should be

    while(1)
    {
    DataRec();
    }

    and 'SimpleLinkSyncWaitLoopCallback()' should be used to put the system in LPDS mode.

    Regards,
    Ankur

    ----------------------------------------------------------------------------------------------------------
    Please click the 
    Verify Answer button on this post if it answers your question.
    ----------------------------------------------------------------------------------------------------------

  • In reply to Ankur Baranwal:

    Hi Ankur,

    I had tried this method, but it did not work.
    I add below two functions in main.c and I am sure device is blocking on 'sl_RecvFrom()'
    but it seems never enter LPDS mode
    would you please tell me more detail about how to put system in LPDS mode in this circumstance~
    thanks~

    void SimpleLinkSyncWaitLoopCallback()
    {
    set_host_irq_as_lpds_wk_src(true);
    cc_idle_task_pm();
    set_host_irq_as_lpds_wk_src(false);
    }

    void vApplicationIdleHook( void)
    {
    SimpleLinkSyncWaitLoopCallback();
    }
  • In reply to Markii Cheng:

    Markii,

    I have some doubts related to your application.
    Are you using OS environment or Non-OS? In the previous post you are referring to Non-OS example but in this post you are using 'vApplicationIdleHook()' which is used in OS applications.

    Regards,
    Ankur

    ----------------------------------------------------------------------------------------------------------
    Please click the 
    Verify Answer button on this post if it answers your question.
    ----------------------------------------------------------------------------------------------------------

  • In reply to Ankur Baranwal:

    Hi Ankur,

    I am using Non-OS.
    I saw other threads mentioned that when system idle would call 'vApplicationIdleHook()'.
    I just try it.
    so how can I put system to LPDS mode when system is blocking on 'sl_RecvFrom()' in Non-OS environment?
    thanks~~~
  • In reply to Markii Cheng:

    Hi Markii,

    Please refer to the 'idle_profile_non_os' example in SDK.
    When in blocking mode the function 'SimpleLinkSyncWaitLoopCallback()' is called by the simplelink host driver and can be used to put the system in the low power mode.
    This function is mapped with the host driver function in user.h @ "cc3200-sdk\simplelink" and 'NON_OS_PM' should be defined in the project properties.

    Regards,
    Ankur

    ----------------------------------------------------------------------------------------------------------
    Please click the 
    Verify Answer button on this post if it answers your question.
    ----------------------------------------------------------------------------------------------------------

  • In reply to Ankur Baranwal:

    Hi Ankur,

    thanks a lot~~

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.