mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-05 19:07:41 +00:00
cc2538: spi: Do not call SPI_WAITFOREORx() at end of init
If the SSI has never been used and spi_init() is called, then the SSI receive FIFO is empty and remains so, so calling SPI_WAITFOREORx() at the end of spi_init() waits endlessly for SSI_SR.RNE to be set. Hence, this call must be removed in order to avoid a deadlock. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
This commit is contained in:
parent
a6227e1e3e
commit
f34731c1a9
@ -91,8 +91,5 @@ spi_init(void)
|
||||
|
||||
/* Enable the SSI */
|
||||
REG(SSI0_BASE + SSI_CR1) |= SSI_CR1_SSE;
|
||||
|
||||
/* Clear the RX FIFO */
|
||||
SPI_WAITFOREORx();
|
||||
}
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user