cancel
Showing results for 
Search instead for 
Did you mean: 

In CubeMX, how to enable "Hardware Flow Control (RS485)?"

PMial.2454
Associate II

Hello

I am using STM32CubeIDE 1.0.2 with CubeMX.

Hardware: STM3240G-EVAL (Evaluation board with STM32F407IG)

I have to use RS485 in the program.

In CubeMX in UART options, I do not see the option "Hardware Flow Control (RS485).

On the video https://youtu.be/x0p2p9RLtkA?t=60 I can see that there is such an option in CubeMX at UART. Can I turn it on somehow? Can I use CubeMX to generate the code for rs485? If so, in what way?

1 ACCEPTED SOLUTION

Accepted Solutions
Paul1
Lead

I'm thinking STM32F4 doesn't have Hardware RS-485 DE signal.

We tried STM32F413 and it didn't, so we tried software driven DE, but ran into an issue with the DE disable being late by about a bit due to the transmit finished interrupt timing. That late DE disable caused a clash with other modules that transmitted right after we finished.

We switched over to STM32L4 series because it does have hardware DE.

We proved this on STM32L476, and are also using the STM32L4A6 (more resources).

RS-485 Hardware DE if supported in the chip's hardware

is enabled in STM32CubeMX > Pinout&Configuration > Connectivity > UART/USART

right under Mode[Enable] and RS232 flow control (if that is supported in the hip's hardware) .

Paul

View solution in original post

3 REPLIES 3
Paul1
Lead

I'm thinking STM32F4 doesn't have Hardware RS-485 DE signal.

We tried STM32F413 and it didn't, so we tried software driven DE, but ran into an issue with the DE disable being late by about a bit due to the transmit finished interrupt timing. That late DE disable caused a clash with other modules that transmitted right after we finished.

We switched over to STM32L4 series because it does have hardware DE.

We proved this on STM32L476, and are also using the STM32L4A6 (more resources).

RS-485 Hardware DE if supported in the chip's hardware

is enabled in STM32CubeMX > Pinout&Configuration > Connectivity > UART/USART

right under Mode[Enable] and RS232 flow control (if that is supported in the hip's hardware) .

Paul

Imen.D
ST Employee

Hello @PMial.2454​ ,

STM3240G-EVAL supports RS232 and not RS485, you have to refer to this UM1461 User manual STM3240G-EVAL evaluation board, for more details.

You will find in the CubeMx configuration, the "Hardware Flow Control (RS232)" option for STM3240G-EVA board as below:

0693W000005ANy4QAG.jpg 

To display the list of ST boards supported RS485:

Launch STM32CubeMX, select File > New Project > Board Selector tab, then filter criteria (RS485) on Peripheral tree.

0693W000005ANwrQAG.jpg 

Hope this may bring you some help.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
PMial.2454
Associate II

Paul@Port and Imen DAHMEN thank you for the answers, they helped me.