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.

RTOS/CC2640: Pin functions change during runtime (under TI-RTOS)

Part Number: CC2640

Tool/software: TI-RTOS

Hello Champs,

One of my customers has faced with the following issue. They have CC2640 device which can be powered from battery or from USB. and one UART port is connected to UART-USB converter (TUSB family). Issue is that when CC2640 wakes up and pins are set as UART, they go high and thus power up the UART-USB converter. After that CC2640 thinks that it is now powered from USB and doesn't go to sleep, so continues to draw the battery..

The question is  - is it possible to configure pins during runtime so after the device wakes up in the battery-powered mode, they reconfigure UART pins to GPIO and pull them low?

BR,

Ilya

  • Calling UART_close() closes the pins (PIN_close()) which will cause the pins to go back to GPIO pins if it was assigned as such at the time you called PIN_init(). While the application has the UART open, the device really can't go into a power saving mode as it expects that data can be coming in at any time.