Skip to content
Commit 8246d147 authored by Andriy Gelman's avatar Andriy Gelman Committed by Carles Cufí
Browse files

drivers: xmc4xxx: spi: Update buffers before transmitting data



In the interrupt driven spi, spi_context_update_tx() is called once
from the calling thread and then once in spi_xmc4xxx_isr() after each
new byte is received. This actually means that there is one extra call to
spi_context_update_tx(). This is fine if spi_context_update_tx() complete
it's call in the calling thread before the interrupt fires, however, this
cannot be guaranteed especially if the calling thread is pre-emptive and
has a low priority.

Fix this by calling spi_context_update_tx() in the calling thread before
transmitting the first byte.

Signed-off-by: default avatarAndriy Gelman <andriy.gelman@gmail.com>
parent eaec581f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment