diff --git a/os/hal/ports/ADUCM/ADUCM36x/hal_spi_lld.c b/os/hal/ports/ADUCM/ADUCM36x/hal_spi_lld.c index bcba887ed..580adcfb0 100644 --- a/os/hal/ports/ADUCM/ADUCM36x/hal_spi_lld.c +++ b/os/hal/ports/ADUCM/ADUCM36x/hal_spi_lld.c @@ -82,15 +82,16 @@ static void spi_lld_serve_interrupt(SPIDriver *spip) { } /* Pushing the new TX: this will start a new transfer. */ - if((spip->txbuf != NULL) && (spip->size > 0)) { - (spip->txbuf)++; - spip->spi->SPITX = *(spip->txbuf); + if(spip->size > 0) { + if(spip->txbuf != NULL) { + (spip->txbuf)++; + spip->spi->SPITX = *(spip->txbuf); + } + else { + spip->spi->SPITX = dummy_tx; + } } else { - spip->spi->SPITX = dummy_tx; - } - - if(spip->size == 0) { /* Portable SPI ISR code defined in the high level driver, note, it is a macro.*/ _spi_isr_code(spip); diff --git a/readme.txt b/readme.txt index 5bcbbafcc..42021de01 100644 --- a/readme.txt +++ b/readme.txt @@ -74,6 +74,8 @@ ***************************************************************************** *** 20.3.2 *** +- FIX: Fixed a wrong management of the SPI TX buffer in the ADUCM port + (bug #1103). - FIX: Fixed STM32F4 EFL sector bug (bug #1102). - FIX: Fixed differences in STM32 EXTI (bug #1101). - FIX: Fixed STM32 DACv1 driver regressed because DMA changes (bug #1100).