0
\$\begingroup\$

I am working with a STM32L4R5LQFP144 microprocessor right now. I'm trying to use the SPI1 with several sensors. I understand that the SCK on the slave needs to be connected to SPI1_SCK pin on the microprocessor, but there are several different pins that all say SPI1_SCK on the microprocessor.

Do I connect the slave's SCK pin to all of the SPI1_SCK pins on the microprocessor? Or do I pick a single master pin?

Thanks in advance.

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

It means that multiple pins can be used as SP1_SCK but you have to configure which one you want to use. This can be done via the GPIOx_AFR registers, see figure below and see this datasheet: Link to datasheet. enter image description here

\$\endgroup\$
0
\$\begingroup\$

You need to choose one of those available pins. E.g. if you are using some development board, select the pin which is not already connected to something else. If you are designing your own board, select the pin which fits best for your board layout.

Reference manual chapter "8.3.2 I/O pin alternate function multiplexer and mapping" describes how to map peripherals to IO pins: https://www.st.com/resource/en/reference_manual/dm00310109.pdf

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.