2020-09-06 02:02 PM
STM32G474RE: I need to reset the USART3 peripheral and I see the register RCC_APB1RSTR1.USART3RST. I assume this bit needs to be set, then cleared, after a delay. But there doesn't seem to be documentation. What is the correct procedure and how long should the delay be?
2020-09-06 04:47 PM
I don't think any delay is needed. I've never used one and haven't yet run into issues. Could be wrong.
The HAL macros for it don't have any delay, unlike the HAL clock enable macros.
#define __HAL_RCC_USART3_FORCE_RESET() (RCC->APB1RSTR |= (RCC_APB1RSTR_USART3RST))
#define __HAL_RCC_USART3_RELEASE_RESET() (RCC->APB1RSTR &= ~(RCC_APB1RSTR_USART3RST))