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.

CC2640R2F: Device waking from shutdown when SPI transaction is started

Part Number: CC2640R2F


I am experimenting with NPI/SPI on my CC2640R2 launchpad boards.  I have an STM32 chip sending data over SPI (using the NPI framework) to the BLE board.  Once the BLE board gets the data, I use power_shutdown(0,0) to put the BLE chip to sleep.  Once it is asleep I wanted to test sending another SPI packet even though the chip is sleeping (obviously it should ignore the incoming data because the chip is shutdown).  But I notice as soon as the STM32 lowers the MRDY pin, the CC2640R2 wakes up from shutdown.

I have setup the wakeup pin as a different GPIO than the MRDY, and the wakeup pin does work too.  But somehow the MRDY line is also acting as a wakeup.  Is this something to do with NPI setting its own wakeup pins or something?  How do I keep the chip asleep until I want to wake it up later?


  • Hi Erik,

    In the host_test example, the MRDY and SRDY signals are used to signal when the central or the peripheral device are ready to transmit information. Both of these signals are active low. It seems the CC2640R2 is operating in the peripheral role, in which case when MRDY is set to low, then this is telling the CC2640R2 device that the central device is ready to send or receive data.

    Is flow control enabled on the host test project? If so, then what may be happening here is that host_test is using MRDY as a wakeup source. Within the npi_tl.c file inside NPITL_initTL(), the device sets MDRY as a wakeup source.

    If you do not want the device to if this pin goes active & the device is in shutdown, then you should reconfigure the pin to no be a wakeup source right before going to shutdown. 

    Best Regards,


  • Thank you, I hadn't seen that block of code.  That is definitely what causes this behavior.