2023-03-19 11:51 PM
I am using USART 1 and USART 2 of STM32L56VE series microcontroller in RS-485(Hardware flow control) in Async mode, I am using PA9(TX),PA10(RX),PA12(RTS),PD4(RTS),PD5(TX) and PD6(RX) pins. I have observed Transceiver is switched to send immediate at begin of start bit and set back to receive immediate after stop bit. I want to add a delay of ~30us before immediately switching between modes (Rx/Tx)
In STM IDE there is a smartcard mode to add guard time, however it is not available for Asyc RS-485 mode.
I have pull-up resistor of 10K connected on Rx and Tx pins and pull-down resistor of 10k on RTS pins of both USART 1 & 2.
My question is whether a delay/guard time is required as I already have pull-up resistors connected?
What is the way I can achieve ~30us of delay/guard time if it is really required?
@Frantz LEFRERE Can you please help me here?
2023-03-20 12:54 AM
Look at DEAT and DEDT fields in CR1 register.
2023-03-20 02:00 AM
Sure, will look at that. Also, is there any HAL API available for same or we need to compulsory write registers?
2023-03-20 02:10 AM
> is there any HAL API available for same
Cube/HAL is open source, you can look this up easily yourself, just search for DEAT/DEDT.
JW
2023-03-20 04:16 AM
I found it. Thank you.