AnsweredAssumed Answered

How to receive data from master SPI

Question asked by bujak.daniel on Oct 26, 2017

I'm trying to configure my STM32L4 as an SPI slave and am having some difficulty. I've integrated the SPI_FullDuplex_ComDMA sample into my application and configured my device as a slave. I can also use my Aardvark to transmit x# of bytes to the STM32 and it will reply with the data in it's Tx buffer. However, the issue is that the STM32 will only reply if I explicitly call the HAL_SPI_TransmitReceive_DMA function. If I don't call this function first I don't see any interrupt on the STM32 when the master device writes to it.


Do I need to explicitly do a read on the Slave STM32 in order for it the master to be able to send it data? If so, how am I supposed to handle the fact that the amount of data being sent by the master is unknown?