cancel
Showing results for 
Search instead for 
Did you mean: 

I want to use the RS485 interface. How do I get the DE to toggle off? I have configured the USART to enable the DEM bit but the DE line stays high all the time. Do I have to toggle the DE line or is it ran by the uC?

DKrzm.1
Associate II
 
4 REPLIES 4
KnarfB
Principal III

It works for me out of the box using STM32CubeIDE USART1 on a NUCLEO-G071RB board.

Note the DEM,... remarks in the ref.man: This bit can only be written when the USART is disabled (UE=0).

DKrzm.1
Associate II

​So are you using the DEM bit to turn the DE pin on and off directly?

KnarfB
Principal III

No, I configured USART1 in the STM32CubeIDE GUI "pinout view": Mode ansynchronous, checked Hardware Flow Control (RS485), generated the code.

Then; I checked the registers during debug and the output using LA.

Read out and check/post the relevant USART and GPIO registers' content.

Can you toggle the given pin "manually" if set as GPIO output?

JW