Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

CC3220MODA: How to enable power saving feature in SAP/SNP/NPI lib.

Part Number: CC3220MODA
Other Parts Discussed in Thread: CC2640

Hi,

In this post we know use uart_control to disable RX let CC3220 to LPDS

https://e2e.ti.com/support/wireless-connectivity/wifi/f/wi-fi-forum/993442/cc3220moda-using-tidc-01005-reference-has-high-wi-fi-power-consumption/3670471#3670471

We need to disable RX when cc2640 is advertising and let wifi go to LPDS until CC2640 wanna to send data to cc3220.

But have no idea that how to enable power saving inside SAP/NPI ??

We though we can enable/disable in here but not working:

// -----------------------------------------------------------------------------
//! \brief RX Callback provided to Transport Layer for REM RDY Event
//!
//! \return void
// -----------------------------------------------------------------------------
static void NPITask_RemRdyEventCB(uint8_t state)
{
if (state == REM_RDY_ASSERTED && &npiSem != NULL)
{
remRdyISRFlag = NPITASK_REM_RDY_EVENT;
NPITL_startRx(); // <-- Enable uart rx
sem_post(&npiSem);
} else if (state == REM_RDY_DEASSERTED && &npiSem != NULL) {
NPITL_stopRx();// <-- Disable uart rx
}

if (!NPIUTIL_isQueueEmpty(npiSyncTxQueue)
|| !NPIUTIL_isQueueEmpty(npiTxQueue))
{
remRdyISRFlag |= NPITASK_TX_READY_EVENT;
sem_post(&npiSem);
}
}
  • Hi Aichi,

    While it may be possible to add the UART_control directly to the BLE library, keep in mind we have not tested this solution as part of the library. It would be a better solution to keep the provisioning process as short as possible with a timeout, or handle this in the application.

    Have you added this edited file directly to your project? Or did you rebuild the library?

    Best regards,

    Sarah

  • Hi Sarah,

    We rebuild the library by xdctool and makefile inside lib.

    We use this lib not just for provisioning, use this as bridge between BLE doorlock and  Wi-Fi door lock instead, especially when Wi-Fi doesn't connected. Thats why we keep BLE advertising, once door open event got from BLE, pass door open event to cc3220 via SAP.

    BTW, what you mean "add the UART_control directly to the BLE library" and "handle this in the application.",  Could you please share some details how to achieve power saving under SAP/SNP ?

    Thanks.

  • What is not working? the compilation or your code?

    Did you verify that you NPITL_startRx/NPITL_stopRx are being called?

      

  • Hi Kobi,

    The not working means theCC3220 power consumption seems going to LPDS, but the Wi-Fi will no response (MQTT client is down)....

    Customer confirms these 2 functions are called in npi_tl_uart_m_simplelink.c.

    This is what we did:

  • Without the SAP, does the CC3220 enter LPDS and is able to maintain the MQTT connections?

    Are you sure the power policy is configured correctly (e.g. "enable network wakeup LPDS" is set).

  • Hi Kobi,

    If just wifi only or without SAP_OPEN, the wifi can enter LPDS ans MQTT is working well.

    The power policy is set with LSI = 2000.

  • Hi Aichi,

    To address my comment above, we provide pre-built, tested libraries in the SDK so that customers do not need to rebuild them. Whenever possible, you should make changes to your own application source (like what comes in the example projects). When you make changes to the linked libraries directly, you risk introducing bugs to what we assume is tested code, and that can make it much harder to debug issues later.

    Best regards,

    Sarah