2020-11-04 10:06 AM
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?
Solved! Go to Solution.
2020-11-04 10:48 AM
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
2020-11-04 10:48 AM
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
2020-11-04 10:59 AM
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:
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.
Hope this may bring you some help.
Imen
2020-11-05 05:09 AM
Paul@Port and Imen DAHMEN thank you for the answers, they helped me.