Fixed syslink DMA by guarding a none-atimic read. #1116
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The hangup of the syslink RX DMA read was due to that the USART_DMACmd function is not atomic and called from uartslkSendDataDmaBlocking as well as uartslkReceiveDMA which is run from an interrupt.
The USARTx->CR3 |= USART_DMAReq; translates to a read-modify-write operation and if the uart RX interupt happened just in the modify state it would write the wrong value to the register.
Syslink DMA RX will be used with only one byte payload as well as it tuns out to be more efficient.
Syslink DMA RX has been enabled again in kbuild.