Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions arch/arm/src/stm32/stm32_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,15 @@ static inline bool spi_16bitmode(FAR struct stm32_spidev_s *priv)
#ifdef CONFIG_STM32_SPI_DMA
static void spi_dmarxwait(FAR struct stm32_spidev_s *priv)
{
nxsem_wait_uninterruptible(&priv->rxsem);
/* Take the semaphore (perhaps waiting). If the result is zero, then the DMA
* must not really have completed???
*/

do
{
nxsem_wait_uninterruptible(&priv->rxsem);
}
while (priv->rxresult == 0);
}
#endif

Expand All @@ -815,7 +823,15 @@ static void spi_dmarxwait(FAR struct stm32_spidev_s *priv)
#ifdef CONFIG_STM32_SPI_DMA
static void spi_dmatxwait(FAR struct stm32_spidev_s *priv)
{
nxsem_wait_uninterruptible(&priv->txsem);
/* Take the semaphore (perhaps waiting). If the result is zero, then the DMA
* must not really have completed???
*/

do
{
nxsem_wait_uninterruptible(&priv->txsem);
}
while (priv->txresult == 0);
}
#endif

Expand Down
10 changes: 9 additions & 1 deletion arch/arm/src/stm32h7/stm32_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,15 @@ static void spi_dmarxwait(FAR struct stm32_spidev_s *priv)
#ifdef CONFIG_STM32H7_SPI_DMA
static void spi_dmatxwait(FAR struct stm32_spidev_s *priv)
{
nxsem_wait_uninterruptible(&priv->txsem);
/* Take the semaphore (perhaps waiting). If the result is zero, then the DMA
* must not really have completed???
*/

do
{
nxsem_wait_uninterruptible(&priv->txsem);
}
while (priv->txresult == 0);
}
#endif

Expand Down
10 changes: 9 additions & 1 deletion arch/arm/src/stm32l4/stm32l4_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,15 @@ static void spi_dmarxwait(FAR struct stm32l4_spidev_s *priv)
#ifdef CONFIG_STM32L4_SPI_DMA
static void spi_dmatxwait(FAR struct stm32l4_spidev_s *priv)
{
nxsem_wait_uninterruptible(&priv->txsem);
/* Take the semaphore (perhaps waiting). If the result is zero, then the DMA
* must not really have completed???
*/

do
{
nxsem_wait_uninterruptible(&priv->txsem);
}
while (priv->txresult == 0);
}
#endif

Expand Down