How reinit UART?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-07 9:43 AM
- After reset MCU init UART - 8bits, no parity bit, init DMA RX and TX, interrupts on - works Ok.
- Reinit UART - 9 bits, even parity bit, no DMA - works Ok.
- Reinit UART the same as p.1 - doesn't work interrupts.
- Labels:
-
DMA
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-07 10:51 AM
Before reinitializing, reset the peripheral with the RCC force/release reset bits to get it back to the as-reset configuration.
__HAL_RCC_USART1_CLK_ENABLE();
__HAL_RCC_USART1_FORCE_RESET();
__HAL_RCC_USART1_RELEASE_RESET();
The initialization is likely expecting this to be as-reset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-07 11:30 AM
DMA would need to be 16-bit for the 9-bit mode.
Perhaps you could double check the content of the DMA controller registers, and share those. If this is a bug it could probably be added to the list.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-09-07 1:35 PM
> doesn't work interrupts
Which interrupts? How do you know they don't work?
Debug as usually: read out and check relevant UART, DMA, NVIC registers.
JW
