STM32H7 SpiComIF and first device handler #9

Merged
muellerr merged 36 commits from mueller/stm32h7-spi-com-if-l3gd20h-handler into master 2021-06-15 15:50:54 +02:00
Showing only changes of commit 93db545a1a - Show all commits

View File

@ -232,6 +232,12 @@ ReturnValue_t SpiComIF::handleIrqSendOperation(uint8_t *recvPtr, SpiCookie *spiC
// yet another HAL driver which is not const-correct..
HAL_StatusTypeDef status = HAL_OK;
if(transferMode == spi::TransferModes::DMA) {
if(cacheMaintenanceOnTxBuffer) {
/* Clean D-cache. Make sure the address is 32-byte aligned and add 32-bytes to length,
in case it overlaps cacheline */
SCB_CleanDCache_by_Addr((uint32_t*)(((uint32_t) sendData ) & ~(uint32_t)0x1F),
sendLen + 32);
}
status = HAL_SPI_TransmitReceive_DMA(spiHandle, const_cast<uint8_t*>(sendData),
currentRecvPtr, sendLen);
}