Closed JeonChangmin closed 4 hours ago
Thanks for the review!
I fixed the cases where spi_num
and reqselTx/Rx
didn't match as you suggested.
There are more than AI87, so I fixed all of them, but please let me know if there is something else you intended.
Description
This pull request addresses an issue in the DMA-based SPI transaction implementation where the DMA request would not be executed under specific conditions.
Problem Details
Issue: When
MXC_SPI_MasterTransactionDMA
is called withtxData == NULL
andrxData != NULL
inSPI_WIDTH_STANDARD
(full duplex) mode, the function setsreqselTx
to-1
. However, inMXC_SPI_RevA1_MasterTransactionDMA
,MXC_SPI_RevA1_TransSetup
may additionally settxData
based on the request. This leads to the use of an invalid request selector, causing the DMA to not be executed and resulting in an infinite wait state.Call Stack:
reqselTx
andreqselRx
based on the device and data presence.MXC_SPI_RevA1_TransSetup
to configure the request, potentially modifyingreq
to include both Tx and Rx data.Solution
reqselRx
andreqselTx
values fromMXC_SPI_MasterTransactionDMA
.MXC_SPI_RevA1_MasterTransactionDMA
after executingMXC_SPI_RevA1_TransSetup
.Additional Fixes
MXC_SPI_SlaveTransactionDMA
.reqselRx
andreqselTx
values in spi_me11.c and spi_me18.c files. Please confirm if this change was intended. (fix in this PR)Tests
spi_me17.c
as a basis.Checklist Before Requesting Review