cancel
Showing results for 
Search instead for 
Did you mean: 

RS485 example for stm32 G4

abhijith_raj
Associate III

Hi,
Is there any RS485 example code available for STM32G497 ?
I referred in community for sample code for enabling RS485, didn't get it.

2 REPLIES 2
Saket_Om
ST Employee

Hello @abhijith_raj 

Unfortunately, there is no example RS485 in our STM32Cube firmware.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om
abhijith_raj
Associate III

Hi @Saket_Om 
I'm implementing RS485 using USART1 and need to configure the DE (Driver Enable) pin. I came across the HAL_RS485Ex_Init() API in the HAL driver, but I didn't find any specific configuration related to the DE pin within it. Should I call HAL_RS485Ex_Init() instead of HAL_UART_Init() for RS485 functionality, or is it required to use both? Also, how exactly should the DE pin be configured in this context?