How to disconnect the uart when data is not transmitting

Hi! i am thinking about cut off uart when data is not transmitting. As a method 1, i am thinking about using CTS and RTS Pin which is hardware flow control! ①Is this possible?? ②also,Is there a sample code that achieves that? Now i am using the nRF52832 and sdk14.0.0. Thank you in advanced!!