Hello, [email protected]
After I did a call of the function SPI_MasterTransferCreateHandleDMA() like this:
SPI_MasterTransferCreateHandleDMA(EXAMPLE_SPI_MASTER, &masterHandle, SPI_MasterUserCallback, NULL, &masterTxHandle,
NULL);// &masterRxHandle as zero.
I can tell that your solution is valid to avoid the problem with DMA_Setcallback.()
But, since the driver is designed to use rxHandle and txHandle you will need to use both.
The rxHandle must be created because it is required on functions as SPI_MasterTransferDMA() and SPI_MasterTransferAbortDMA.(). Otherwise, you will need to implement further changes in the driver to avoid problems.
I don't know if you are using an SDK example. if the answer is no. The spi_dma_b2b_transfer_master example can help you with your work as a reference.
Please, let me know if I can help you further!
Best regards, Diego.