You are here

Disabling UART output pin | Cypress Semiconductor

Disabling UART output pin

Summary: 2 Replies, Latest post by odissey1 on 14 Feb 2016 09:23 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
bkphat's picture
22 posts

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()?





user_1377889's picture
9296 posts

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



user_342122993's picture
530 posts

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

Log in to post new comments.