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.

CC2540 UART and Low Power Mode

Other Parts Discussed in Thread: CC2540

I am currently working on a project that includes a CC2540 and an MSP430 in the design. The two devices are connected together via a UART.

The MSP430 will be sending data to the CC2540 over the UART interface once a second and the CC2540 will use this data to transmit over BLE when connected to a peer device.

I am currently developing the code for the CC2540 based on one of the BLE-CC2540-1.1a sample projects (HeartRate) and am testing on the CC2540 Mini DK. I have successfully got the UART (HAL UART DMA) working so that I can send and receive data.but for this to work I had to comment out the following line in osal_run_system() to prevent entering power mode 2 when there are no tasks to run:

 

  osal_pwrmgr_powerconserve();  // Put the processor/system into sleep

 

The UART does not operate in PM2 but I want the CC2540 to be in PM2 most of the time to minimize current consumption. Therefore I am planning to use flow control so that when the MSP430 has data to send, it will assert it's RTS (CC2540 CTS) . I am then wanting to generate an interrupt on the CC2540 when its CTS becomes asserted and to wake up from sleep mode if in Power Mode 2 at the time then assert RTS to tell the MSP430 that it can transmit. I am then planning to use osal_pwrmgr_task_state() to prevent Power Mode 2 being re-entered until the MSP430 de-asserts its RTS.

In the sample project the only ISR that causes a wake up from sleep mode (by using CLEAR_SLEEP_MODE()) is the halSleepTimerIsr so I need to know if it is ok to also do this from another ISR or would this affect the BLE stack timing?

 

Nick