Commit 8a1a5c23 authored by Dave Hylands's avatar Dave Hylands Committed by Damien George
Browse files

stmhal: Fix hardfault when configured as a SPI slave

parent 5e11d2b3
......@@ -546,7 +546,9 @@ STATIC mp_obj_t pyb_spi_recv(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_
if (status == HAL_OK) {
status = spi_wait_dma_finished(self->spi, args[1].u_int);
}
dma_deinit(&tx_dma);
if (self->spi->hdmatx != NULL) {
dma_deinit(&tx_dma);
}
dma_deinit(&rx_dma);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment