cancel
Showing results for 
Search instead for 
Did you mean: 

RTS keeps high

allard
Senior

I'm using a SoM with a STM32MP157C. I've connected a LTE modem to uart7, its connected with a 4-wire uart, going trough a level shifter. The device tree contains the following:

uart7_pins_mx: uart7_mx-0 {
		pins1 {
			pinmux = <STM32_PINMUX('E', 7, AF7)>, /* UART7_RX */
					 <STM32_PINMUX('E', 10, AF7)>; /* UART7_CTS */
			bias-disable;
		};
		pins2 {
			pinmux = <STM32_PINMUX('E', 8, AF7)>, /* UART7_TX */
					 <STM32_PINMUX('E', 9, AF7)>; /* UART7_RTS */
			bias-disable;
			drive-push-pull;
			slew-rate = <0>;
		};
	};
 
	uart7_sleep_pins_mx: uart7_sleep_mx-0 {
		pins {
			pinmux = <STM32_PINMUX('E', 7, ANALOG)>, /* UART7_RX */
					 <STM32_PINMUX('E', 8, ANALOG)>, /* UART7_TX */
					 <STM32_PINMUX('E', 9, ANALOG)>, /* UART7_RTS */
					 <STM32_PINMUX('E', 10, ANALOG)>; /* UART7_CTS */
		};
	};

and

&uart7{
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&uart7_pins_mx>;
	pinctrl-1 = <&uart7_sleep_pins_mx>;
	status = "okay";
 
	/* USER CODE BEGIN uart7 */
	uart-has-rtscts;
	/* USER CODE END uart7 */
};

When I boot the device the RTS pin is high and it stays high. Reading the device buffer with "cat /dev/ttySTM1" does not cause the pin to go low. When i send a message with "echo "AT" > /dev/ttySTM1" the message "transmission complete is not set" is shown. The CTS pin coming from the modem is low, as expected. Running "cat /proc/tty/driver/stm32-usart" gives the following:

1: uart:stm32-usart mmio:0x40018000 irq:41 tx:12 rx:0 CTS|DSR|CD

I expect the RTS pin to be low, and only to go high when the device buffer is full, any ideas what is going wrong?

This discussion is locked. Please start a new topic to ask your question.
10 REPLIES 10
allard
Senior

This is resolved, it was a hardware issue, a bi-directional level shifter made it somewhat difficult to debug.