cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 spi half-duplex transmit into receive mode

Staly.1
Associate III

the target type is stm32f072, firstly the master transmit data success, slave receive data ok;

should i need to disable spi ,enable BIDIOE in slave. but the slave can't transmit data, how to solve it?

5 REPLIES 5
prain
Senior III

what is your SPI slave? bidirectional mode is not supported by all SPI devices. It is a request / response protocol. Normal SPI use simultaneous data transfer on miso and mosi lines.

TDK
Guru

The master always drives the clock. Slave can only wait for the clock and send out data.

The reference manual has a section on how to do this. You're not trying to have the chip be a master, then turn into a slave, are you? That's not how it should work.

If you feel a post has answered your question, please click "Accept as Solution".

my spi slave is stm32f031, the connection is master MOSI to slave MISO

be aware that slave can not initiate a transfer. bus management and clock generation​ can be done only from master side. If you want to send data from slave to master, the master should send junk data to initiate transfer

thank you for your reply, i 'ill try to send junk data in the master side