cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

RoRo_3281831
New Contributor II

So I have exactly the same problem as this question, but that one did not give a workable solution.

https://community.cypress.com/t5/PSoC-5-3-1-MCU/Disabling-UART-output-pin/td-p/198860

I have an external sensor that is controlled via serial communication and I use a transistor to shut it off when not in use or when I want to reset it.

Problem is that the UART TX pin stays high even when the power is shut off.  This back-powers some portions of the sensor's MCU (which is also a PSoC), and I believe it may be causing some other problems on the board with things not resetting properly. 

How do I force the UART SCB to shut off its TX pin power when not in use?  I tried using UART_Stop(), but that does nothing.  I tried using an external digital pin to drive the output, then writing a "0" to that pin after calling UART_Stop(), but that also seems to have no effect.

How do I do this?

0 Likes
2 Replies
Aashita_Raj
Moderator
Moderator

Hi @RoRo_3281831 ,

I went through your problem statement and with regard to this, can you please check out the knowledge based article (KBA) on our community here :  Enable/Disable an Input Pin In Firmware - KBA23012... - Cypress Developer Community   . This KBA explains the steps, you need to follow in order to disable an input pin in firmware. Can you please follow the similar steps mentioned there for UART_TX pin and let us know if this helps you?

Please let us know in case of any further clarifications.

Best Regards,

Aashita

0 Likes
Len_CONSULTRON
Honored Contributor II

RoRo,

Aashita's suggested link in effect allows the CPU to control the output pin drive mode.  This should be true even though the link is for a PSoC5 and you are using a PSoC4.

Once you have control of the Tx pin drive mode, you need to make sure of the following:

  • The UART TX FIFO is empty
  • The UART TX is done.  (Ie all the bits of the last byte in the FIFO has left the pin INCLUDING the stop bit.   There is a TxStatus register signal.  Or if you want you can turn on the UART_TX_DONE interrupt and create a ISR to turn off the Tx pin.
  • Lastly, because in the OFF mode the TX is not an output, you need to turn it back on as an output before sending the first byte of the next packet of data.
Len
"Engineering is an Art. The Art of Compromise."
0 Likes