git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10956 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2017-11-05 11:10:11 +00:00
parent 5f7fd279be
commit bfabd1d961
3 changed files with 10 additions and 6 deletions

View File

@ -730,9 +730,10 @@ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) {
dmaStreamSetMode(uartp->dmatx, uartp->dmamode | STM32_DMA_CR_DIR_M2P | dmaStreamSetMode(uartp->dmatx, uartp->dmamode | STM32_DMA_CR_DIR_M2P |
STM32_DMA_CR_MINC | STM32_DMA_CR_TCIE); STM32_DMA_CR_MINC | STM32_DMA_CR_TCIE);
/* Only enable TC interrupt if there's a callback attached to it. /* Only enable TC interrupt if there's a callback attached to it or
Also we need to clear TC flag which could be set before. */ if called from uartSendFullTimeout(). Also we need to clear TC flag
if (uartp->config->txend2_cb != NULL) { which could be set before.*/
if ((uartp->config->txend2_cb != NULL) || (uartp->early == false)) {
uartp->usart->SR = ~USART_SR_TC; uartp->usart->SR = ~USART_SR_TC;
uartp->usart->CR1 |= USART_CR1_TCIE; uartp->usart->CR1 |= USART_CR1_TCIE;
} }

View File

@ -953,9 +953,10 @@ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) {
dmaStreamSetMode(uartp->dmatx, uartp->dmamode | STM32_DMA_CR_DIR_M2P | dmaStreamSetMode(uartp->dmatx, uartp->dmamode | STM32_DMA_CR_DIR_M2P |
STM32_DMA_CR_MINC | STM32_DMA_CR_TCIE); STM32_DMA_CR_MINC | STM32_DMA_CR_TCIE);
/* Only enable TC interrupt if there's a callback attached to it. /* Only enable TC interrupt if there's a callback attached to it or
Also we need to clear TC flag which could be set before. */ if called from uartSendFullTimeout(). Also we need to clear TC flag
if (uartp->config->txend2_cb != NULL) { which could be set before.*/
if ((uartp->config->txend2_cb != NULL) || (uartp->early == false)) {
uartp->usart->ICR = USART_ICR_TCCF; uartp->usart->ICR = USART_ICR_TCCF;
uartp->usart->CR1 |= USART_CR1_TCIE; uartp->usart->CR1 |= USART_CR1_TCIE;
} }

View File

@ -150,6 +150,8 @@
dependencies and configuration directories. This makes possible dependencies and configuration directories. This makes possible
to have multiple non-conflicting makefiles in the same project. to have multiple non-conflicting makefiles in the same project.
Updated the various platform.mk implementing "smart build" mode. Updated the various platform.mk implementing "smart build" mode.
- HAL: Fixed function uartSendFullTimeout() failing on STM32 USARTv1 and
v2 drivers (bug #901)(backported to 17.6.3 and 16.1.10).
- HAL: Fixed broken I2C fallback driver (bug #900)(backported to 17.6.3). - HAL: Fixed broken I2C fallback driver (bug #900)(backported to 17.6.3).
- LIB: Fixed heap buffer alignment not enforced (bug #899)(backported - LIB: Fixed heap buffer alignment not enforced (bug #899)(backported
to 17.6.3). to 17.6.3).