summaryrefslogtreecommitdiff
path: root/src/stm/ao_spi_stm.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-09-03 00:55:19 -0500
committerKeith Packard <keithp@keithp.com>2016-09-03 01:23:31 -0500
commitaf2eefbed43e56885a7321319d69b7be17354cdd (patch)
tree407fcc62fe73ab58b99b536718932efe3a9e08ee /src/stm/ao_spi_stm.c
parent4fc5cfa2c63c43ab0a9ef7e0cc6832fb1c163bd6 (diff)
altos/stm: Set MISO DMA priority to HIGH to avoid OVR
When the MISO DMA priority is too low, and the processor gets busy, it's possible for SPI input to overrun the processor, which causes the MISO DMA to get out of sync and never finish. Set the MISO DMA priority to HIGH to avoid this. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_spi_stm.c')
-rw-r--r--src/stm/ao_spi_stm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stm/ao_spi_stm.c b/src/stm/ao_spi_stm.c
index 5a3790c5..05078f3b 100644
--- a/src/stm/ao_spi_stm.c
+++ b/src/stm/ao_spi_stm.c
@@ -116,7 +116,7 @@ ao_spi_set_dma_miso(uint8_t id, void *data, uint16_t len, uint32_t minc)
data,
len,
(0 << STM_DMA_CCR_MEM2MEM) |
- (STM_DMA_CCR_PL_MEDIUM << STM_DMA_CCR_PL) |
+ (STM_DMA_CCR_PL_HIGH << STM_DMA_CCR_PL) |
(STM_DMA_CCR_MSIZE_8 << STM_DMA_CCR_MSIZE) |
(STM_DMA_CCR_PSIZE_8 << STM_DMA_CCR_PSIZE) |
(minc << STM_DMA_CCR_MINC) |