2023-06-25 03:12 AM
Hi All,
I have two Questions,
The first one is:
I was trying to use one of the SPI examples provided by ST SDK, but the "STM32L476G-EVAL" target doesn't have an SPI example, so I used the NUCLEO-L476RG SPI_FullDuplex_ComDMA example as a reference.
I was trying to use the SPI1 with DMA1, but the code got stuck after calling "HAL_SPI_Transmit_DMA", And when I used a logic analyzer, I saw the transaction was done successfully.
The second question is:
I used two DMA1 channels for tx and rx, used channel 3 for TX and channel 2 for RX, like the "SPI_FullDuplex_ComDMA" example; as I said before, the code got stuck after sending the first transaction, but when I used another channel for TX, The transaction didn't occur.
So, Is there something I'm missing? Must SPI1 work with DMA1channel3, and if so, Why did the code get stuck after the first transaction?
Solved! Go to Solution.
2023-07-04 05:59 AM
Thank you for your quick reply,
I figured out the issue; I commented some lines in DMA_handler by mistake.
after reverting it, it works fine with me
Thank you
2023-06-25 12:18 PM
What code?
2023-06-25 01:59 PM
> code got stuck after calling "HAL_SPI_Transmit_DMA"
What is "code got stuck"? Where does the program counter point in disasm window?
> Must SPI1 work with DMA1channel3
JW
2023-07-04 05:59 AM
Thank you for your quick reply,
I figured out the issue; I commented some lines in DMA_handler by mistake.
after reverting it, it works fine with me
Thank you