2024-07-25 08:01 AM
I have an STM32L433 that implements a SPI slave, it is connected to another MCU master. It is unclear from the datasheet and searches for answers whether MISO and MOSI on the slave should connect directly to MISO and MOSI on the master, or, if they should be crossed.
Is master MOSI -> slave MOSI and master MISO to slave MISO correct?
Sid
Solved! Go to Solution.
2024-07-25 08:17 AM - edited 2024-07-25 08:22 AM
Ah, right - I see what you mean!
The RM suggests that the direction of the pin does depend on whether the peripheral is in Master or Slave mode:
A fine example of data that would have been much clearer if presented as a table
2024-07-25 08:05 AM
The names say it all:
MOSI = Master Out, Slave In;
MISO = Master In, Slave Out.
@SidPrice wrote:Is master MOSI -> slave MOSI and master MISO to slave MISO correct?
Yes. This is standard SPI - nothing specific to STM32
2024-07-25 08:11 AM
Thank you, yes, I fully understand that. Perhaps I should have been more specific.
I am concerned about the connections on the STM32L4. PA6 is SPI1 MISO, PA7 is SPI1 MOSI. So, when the L4 is a slave, the master MOSI is connected to PA6 or PA7.
2024-07-25 08:17 AM - edited 2024-07-25 08:22 AM
Ah, right - I see what you mean!
The RM suggests that the direction of the pin does depend on whether the peripheral is in Master or Slave mode:
A fine example of data that would have been much clearer if presented as a table
2024-07-25 08:23 AM
@Andrew Neil Thank you, I missed that in the TRM.
I think I should be able to put Master MISO on PA6 of the slave and master MOSI on PA7.
Again, thanks for the prompt input :beaming_face_with_smiling_eyes: