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.

USART ISR while using Power Saving CC2541

I am attempting to use USART ISR with Power Saving for my application.

I have seen a number of posts going in different directions on best way to do this, as well as arguments saying how this could/or could not be done in certain power modes. My understanding is that you can only receive these interrupts when expecting data via SPI if you are in PM3.

After reading the documentation I found that by setting SLEEPCMD accordingly then setting PCON_IDLE to 1, that PM3 would be used. I keep having errors not allowing me to set PCON_IDLE.

I'm curious what the best way everyone has discovered is to conserve the most power while using USART to receive data over SPI. In my application I can't expect a periodic time where data may be sent so that I can exit power saving temporarily like some have suggested. Ideally I would be able to catch the data at any point.

Thanks In Advance.

  • So, I've seen that some people have used the CS pin of their UART/SPI config in order to wake up the device.

    Currently I am attempting to use the CS as a general GPIO Interrupt in order to wake up my device so that the UART interrupt can be received. My question is what are options/best ways for waking up the device once my GPIO ISR is called?

    I'm assuming that either the SPI RX ISR is either prioritized over the GPIO Interrupts, or I will have to disable the GPIO Interrupt once device is woken up so that SPI RX ISR will be called. Main problem is verifying that I am waking up the device, then I can test that.

       

  • I now have my device waking up when it receives a GPIO Interrupt by using:

    //GPIO Interrupt

    GPIO ISR

    {   CLEAR_SLEEP_MODE();

         osal-pwrmgr_task_state(....,pwrmgr_hold

    }

    Once this is done my UARTRX ISR is called and data is read properly. How can I put device back into sleep mode until the next GPIO ISR as it was before?