temp fix for DMA driver

This commit is contained in:
Michele Balistreri 2023-03-28 10:15:28 +02:00
parent 7c6dd800f2
commit 0468191369
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A
1 changed files with 4 additions and 3 deletions

View File

@ -296,7 +296,7 @@ status_t LPSPI_MasterTransferEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *
}
}
EDMA_SetCallback(handle->edmaRxRegToRxDataHandle, EDMA_LpspiMasterCallback,
EDMA_SetCallback(handle->edmaTxDataToTxRegHandle, EDMA_LpspiMasterCallback,
&s_lpspiMasterEdmaPrivateHandle[instance]);
/* Configure rx EDMA transfer */
@ -357,8 +357,6 @@ status_t LPSPI_MasterTransferEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *
EDMA_SetTransferConfig(handle->edmaRxRegToRxDataHandle->base, handle->edmaRxRegToRxDataHandle->channel,
&transferConfigRx, NULL);
EDMA_EnableChannelInterrupts(handle->edmaRxRegToRxDataHandle->base, handle->edmaRxRegToRxDataHandle->channel,
(uint32_t)kEDMA_MajorInterruptEnable);
/* Configure tx EDMA transfer */
EDMA_ResetChannel(handle->edmaTxDataToTxRegHandle->base, handle->edmaTxDataToTxRegHandle->channel);
@ -511,6 +509,9 @@ status_t LPSPI_MasterTransferEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *
&transferConfigTx, NULL);
}
EDMA_EnableChannelInterrupts(handle->edmaTxDataToTxRegHandle->base, handle->edmaTxDataToTxRegHandle->channel,
(uint32_t)kEDMA_MajorInterruptEnable);
EDMA_StartTransfer(handle->edmaTxDataToTxRegHandle);
EDMA_StartTransfer(handle->edmaRxRegToRxDataHandle);
LPSPI_EnableDMA(base, (uint32_t)kLPSPI_RxDmaEnable | (uint32_t)kLPSPI_TxDmaEnable);