From 17176480dff22e30acc8c83fd568eeff72777366 Mon Sep 17 00:00:00 2001 From: Valmantas Paliksa Date: Fri, 12 Apr 2019 08:14:17 -0600 Subject: [PATCH] arch/arm/src/stm32f7/stm32_spi.c: Add SPI DMA threshold configuration. --- arch/arm/src/stm32f7/stm32_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/stm32f7/stm32_spi.c b/arch/arm/src/stm32f7/stm32_spi.c index d0c9da5fb1a..67c81266ec1 100644 --- a/arch/arm/src/stm32f7/stm32_spi.c +++ b/arch/arm/src/stm32f7/stm32_spi.c @@ -1680,7 +1680,7 @@ static void spi_exchange(FAR struct spi_dev_s *dev, FAR const void *txbuffer, if ((priv->rxdma == NULL) || (priv->txdma == NULL) || (txbuffer && !stm32_dmacapable((uint32_t)txbuffer, nwords, priv->txccr)) || (rxbuffer && !stm32_dmacapable((uint32_t)rxbuffer, nwords, priv->rxccr)) || - up_interrupt_context()) + up_interrupt_context() || nwords < CONFIG_STM32F7_SPI_DMA_THRESHOLD) { /* Invalid DMA channels, unsupported memory region, or interrupt context, fall back to non-DMA method. */