Disabling UART output pin

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

cross mob
Anonymous
Not applicable

I am reading from a UART sensor and using an external transistor to turn the sensor off when it's not needed. I noticed, however, that the output pin from my UART component stays "HIGH" the entire time. It seems that my this UART pin is actually supplying power to the senor, regardless if I've disabled power via the external transistor. As a result, this is draining unnecessary current. 

   

Is there a straightforward way to pull all my UART pins "LOW" when I'm not using them? It seems that calling UART_Stop() does not do this. The only way I've gotten this to work is to use a register to trigger the hardware-disable port on the pin. Is there a way to configure the UART components to do this automatically when calling Sleep() or Stop()?

   

Thanks!

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

You may set the pin's drive mode to high Z, There are APIs for doing that, check the UART_Pins.h files.

   

 

   

Bob

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        bkphat, Something like #define Pin_DM_DIG_HIZ (0x01u) // High Impedance Digital. #define Pin_DM_STRONG (0x06u) // Strong Drive. PIN_SetDriveMode(Pin_DM_STRONG); //digital output PIN_SetDriveMode(Pin_DM_DIG_HIZ); //digital input   
0 Likes