summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJerzy Kasenberg <[email protected]>2022-01-14 09:14:49 +0100
committerJerzy Kasenberg <[email protected]>2022-01-19 09:06:43 +0100
commit980ffe3b4e41ce5e43c3e8ae13f605f7d7b50b7f (patch)
tree58f07f90d703589bc0e0fea90beca03998123762 /docs
parent0b6b4f24412e9d926ed4cd08c6ab5a49dfb9696b (diff)
nrf5x: Fix DMA access race condition
In multi-thread mode starting DMA in thread mode was prone to race condition resulting in infinite loop. It may happen on single core CPU with strict priority based tasks scheduler where ready high prio task never yields to ready low prio task (Mynewt). Sequence that failed (T1 - low priority task, T2 - high priority task) - T1 called start_dma() - T1 set _dcd.dma_running (DMA not started yet, context switch happens) - T2 took CPU and saw that _dcd.dma_running is set, so waits for _dcd.dma_running to be 0 - T1 never gets CPU again, DMA is not started T2 waits forever OSAL mutex resolves problem of DMA starting from thread-context.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions