Skip to main content
DKrzm.1
Associate
January 23, 2020
Question

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?

  • January 23, 2020
  • 4 replies
  • 1402 views

..

This topic has been closed for replies.

4 replies

KnarfB
Super User
January 23, 2020

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
DKrzm.1Author
Associate
January 23, 2020

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

KnarfB
Super User
January 23, 2020

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.

waclawek.jan
Super User
January 23, 2020

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