arm/rp2040: Fix SPI halfword DMA transfer
This commit is contained in:
parent
87d5a39f68
commit
40fe666d3f
@ -357,7 +357,7 @@ void rp2040_rxdmasetup(DMA_HANDLE handle, uintptr_t paddr, uintptr_t maddr,
|
|||||||
RP2040_DMA_CTRL_TRIG_TREQ_SEL_MASK) |
|
RP2040_DMA_CTRL_TRIG_TREQ_SEL_MASK) |
|
||||||
((ch << RP2040_DMA_CTRL_TRIG_CHAIN_TO_SHIFT) &
|
((ch << RP2040_DMA_CTRL_TRIG_CHAIN_TO_SHIFT) &
|
||||||
RP2040_DMA_CTRL_TRIG_CHAIN_TO_MASK) |
|
RP2040_DMA_CTRL_TRIG_CHAIN_TO_MASK) |
|
||||||
config.size;
|
(config.size << RP2040_DMA_CTRL_TRIG_DATA_SIZE_SHIFT);
|
||||||
|
|
||||||
if (!config.noincr)
|
if (!config.noincr)
|
||||||
{
|
{
|
||||||
@ -418,7 +418,7 @@ void rp2040_txdmasetup(DMA_HANDLE handle, uintptr_t paddr, uintptr_t maddr,
|
|||||||
RP2040_DMA_CTRL_TRIG_TREQ_SEL_MASK) |
|
RP2040_DMA_CTRL_TRIG_TREQ_SEL_MASK) |
|
||||||
((ch << RP2040_DMA_CTRL_TRIG_CHAIN_TO_SHIFT) &
|
((ch << RP2040_DMA_CTRL_TRIG_CHAIN_TO_SHIFT) &
|
||||||
RP2040_DMA_CTRL_TRIG_CHAIN_TO_MASK) |
|
RP2040_DMA_CTRL_TRIG_CHAIN_TO_MASK) |
|
||||||
config.size;
|
(config.size << RP2040_DMA_CTRL_TRIG_DATA_SIZE_SHIFT);
|
||||||
|
|
||||||
if (!config.noincr)
|
if (!config.noincr)
|
||||||
{
|
{
|
||||||
|
@ -1070,7 +1070,7 @@ static void spi_dmatxsetup(FAR struct rp2040_spidev_s *priv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
rp2040_txdmasetup(priv->txdmach, (uintptr_t)dst, (uintptr_t)txbuffer,
|
rp2040_txdmasetup(priv->txdmach, (uintptr_t)dst, (uintptr_t)txbuffer,
|
||||||
nwords, priv->txconfig);
|
nwords << priv->txconfig.size, priv->txconfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -1110,7 +1110,7 @@ static void spi_dmarxsetup(FAR struct rp2040_spidev_s *priv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
rp2040_rxdmasetup(priv->rxdmach, (uintptr_t)src, (uintptr_t)rxbuffer,
|
rp2040_rxdmasetup(priv->rxdmach, (uintptr_t)src, (uintptr_t)rxbuffer,
|
||||||
nwords, priv->rxconfig);
|
nwords << priv->rxconfig.size, priv->rxconfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user