How to properly use SPI communication in STM32L053 ??
Hello.
I am working on a project and using STM32L053 board.
For now, my goal is to create a channel of SPI communication, master & slave, an to test my code.
I am using only 1 ST board which serves both as master and slave.
I have defined all necessary GPIOs using the CubeMX program - miso, mosi, clk, (software nss).
As part of the requirements i need to use the DMA in order to transmitte and receive date.
Each SPI has it's own Rx & Tx buffers which are connected to the relevant channel of the DMA.
The problem:
I have been able to send data only in one direction: Master --> Slave - I load the Tx buffer of the master and send it to the slave. The slave receives it properly into it's Rx buffer. I also see the DMA channels do what they are suppose to do.
The other way around does not seem to work. No matter what i have tried, the master wont get back a reply for the slave.
Any ideas to what should i pay more attention or check in my code ??