Reconfiguring UART to GPIO

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi guys,

   

I'm using the CYBL10563 and I'm wondering if it is possible to change the UART Tx/Rx pin to digital pins? What I wanted to do exactly was

   
        
  • Enable UART. 
  •     
  • When the device goes to sleep, disable UART and configure Tx as an output and Rx as an input.
  •     
  • Read a pulse on Rx to wakeup.
  •     
  • Once awake from sleep mode, re-enable the UART.
  •    
   

Is it possible do this and switch between these two modes for the pins? 

   

Any ideas would be great!

   

PL

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The re-definition of pin's drive mode can be made with the pin's APIs, but to cut and re-enable the hw-connection is not as easy. You have a choice to "Enable wakeup from Deep Sleep Mode" when configuring the UART. Doesn't that do what you want to perform?

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Unfortunately not. The PSOC device is used a touch detect IC on my board. It uses UART to notify the Main processor that a touch has occurred. When the device is in power down, the psoc needs to set a latch on receiving a touch. But because the Tx signal stays high I need to reconfigure the pin to a digital output driven low. This way it can keep the other device powered off until it receives a touch and it then goes high to power up the other device.

   

I only have the UART lines connected to the device so I've no other choice at the moment but to reconfigure the UART to a GPIO.

   

Thanks,

   

PL

0 Likes