2019-05-09 06:21 AM
Hi there,
I am currently using the HAL_SPI_TransmitReceive() function for back-to-back read/write with a GPS modem as the slave. If i want to now implement the SPI coms with DMA, what is the correct DMA channel config in CubeMX?
Only one DMA channel is allowed (RX/TX) for the SPI master.
Thank you
2019-05-10 04:46 AM
Hi @NA1
There are several versions of DMA. To answer your question, i have to know which MCU and DMA do you use?
If DMA without DMAMUX => there is a mapping table in the reference manual
If DMA with DMAMUX => You can use any DMA channel and it works perfectly
Best regards,
Nesrine
2019-05-10 04:57 AM
HI Thank you for the response.
I am using the STM32L073RZTx, and am trying to implement HAL_SPI_TransmitReceive_DMA().
The DMA configuration in the SPI config in CubeMX is my question for the above implementation.
Thank you for the help once again, I really appreciate it!
2019-05-10 05:12 AM
You can do the configuration according to the mapping.
Look at this table: Summary of the DMA requests for each channel
Best regards,
Nesrine.