drivers/can/mcp2515.c Fix Missing Chipselect de-assert before bus unlocking

This commit is contained in:
paolovolpi 2023-05-25 17:16:57 +02:00 committed by Alan Carvalho de Assis
parent 0b8d5e993d
commit 8b27e455b1
1 changed files with 1 additions and 0 deletions

View File

@ -1177,6 +1177,7 @@ static void mcp2515_reset_lowlevel(FAR struct mcp2515_can_s *priv)
SPI_LOCK(config->spi, true); SPI_LOCK(config->spi, true);
SPI_SELECT(config->spi, SPIDEV_CANBUS(0), true); SPI_SELECT(config->spi, SPIDEV_CANBUS(0), true);
SPI_SEND(config->spi, MCP2515_RESET); SPI_SEND(config->spi, MCP2515_RESET);
SPI_SELECT(config->spi, SPIDEV_CANBUS(0), false);
SPI_LOCK(config->spi, false); SPI_LOCK(config->spi, false);
/* Wait 1ms to let MCP2515 restart */ /* Wait 1ms to let MCP2515 restart */