Commit 0c9d5b0
committed
Fix STM32 SPI async API for STM32H7 (SPI_IP_VERSION_V2)
By default, HAL functions (HAL_SPI_TransmitReceive_IT/HAL_SPI_Transmit_IT/HAL_SPI_Receive_IT) assume that SPI is disabled between function invocation.
It's needed to set transfer size (CR2 register), that can be modified only if SPI disabled. But `stm32_spi_api.c` keeps SPI enabled after initialization.
This commit adds helper code for STM32H7 (SPI_IP_VERSION_V2) that disables SPI before HAL_SPI_TransmitReceive_IT/HAL_SPI_Transmit_IT/HAL_SPI_Receive_IT
and after end of transaction for HAL API compatibility.1 parent 756f6f5 commit 0c9d5b0
1 file changed
+21
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
1392 | 1397 | | |
1393 | 1398 | | |
1394 | 1399 | | |
| |||
1407 | 1412 | | |
1408 | 1413 | | |
1409 | 1414 | | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
1410 | 1421 | | |
1411 | 1422 | | |
1412 | 1423 | | |
| |||
1506 | 1517 | | |
1507 | 1518 | | |
1508 | 1519 | | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1509 | 1530 | | |
1510 | 1531 | | |
1511 | 1532 | | |
| |||
0 commit comments