arch/arm/src/stm32f7/stm32_spi.c: Add SPI DMA threshold configuration.

This commit is contained in:
Valmantas Paliksa 2019-04-12 08:14:17 -06:00 committed by Gregory Nutt
parent 8cea24fdf0
commit 17176480df

View File

@ -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. */