How to use RCC to reset a peripheral?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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?
Labels:
- Labels:
-
RCC
-
STM32G4 Series
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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))
If you feel a post has answered your question, please click "Accept as Solution".