mirror of
https://github.com/EFeru/hoverboard-sideboard-hack-STM.git
synced 2026-02-17 15:31:11 +00:00
Major UART communication improvement
- the UART communication is improved based on UART Idle line detection interrupt - an Rx ring buffer is used to manage the UART incoming data - both Tx and Rx are efficiently handled using DMA - fixed #1 Other: - minor visual improvements
This commit is contained in:
@@ -112,9 +112,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
|
||||
HAL_NVIC_SetPriority(USART2_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(USART2_IRQn);
|
||||
/* USER CODE BEGIN USART2_MspInit 1 */
|
||||
// DMA1_Channel7->CPAR = (uint32_t) & (USART2->DR);
|
||||
// DMA1_Channel7->CNDTR = 0;
|
||||
// DMA1->IFCR = DMA_IFCR_CTCIF7 | DMA_IFCR_CHTIF7 | DMA_IFCR_CGIF7;
|
||||
__HAL_UART_ENABLE_IT (uartHandle, UART_IT_IDLE); // Enable the USART IDLE line detection interrupt
|
||||
/* USER CODE END USART2_MspInit 1 */
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user