cancel
Showing results for 
Search instead for 
Did you mean: 

Does STM32L051K8T6 have one SPI bus in two places, or two SPI buses?

ARyan.4
Associate II

I'm new to embedded design, and I'm trying to wrap my head around the pinouts of the STM32L051K8T6. It says on the webpage it has two SPI buses, however the datasheet it seems to list one (SPI1) in two separate places (pins 11,12,13 & pins 21, 22, 26)

I was wondering, does this mean it's technically the same bus? I can see the large packages (not 32 pin but 64,) has both SPI1 and SPI2 where this MCU only lists SPI1 twice.

Any clarification would be appreciated 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Welcome, @ARyan.4​, to the community!

The website has a typo here, but the datasheet is always relevant for precise information.

The STM32L051K8T6 is coming in an LQFP32, which is limited to one SPI only. To have two SPIs available, you have to upgrade to a larger package, e.g. the STM32L051Cx (48 pins) or STM32L051Rx (64 pins).

The pins you mentioned are the alternative pins: if one or more cannot be used for a better layout or because of other peripherals, you can switch to the alternative pins. To do this with CubeMX, you first have to assign the pin and long click on the pin with the Ctrl key (at least 0.5s). The alternative pin then flashes and you can move the function from the first pin there.

Good luck!

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

Welcome, @ARyan.4​, to the community!

The website has a typo here, but the datasheet is always relevant for precise information.

The STM32L051K8T6 is coming in an LQFP32, which is limited to one SPI only. To have two SPIs available, you have to upgrade to a larger package, e.g. the STM32L051Cx (48 pins) or STM32L051Rx (64 pins).

The pins you mentioned are the alternative pins: if one or more cannot be used for a better layout or because of other peripherals, you can switch to the alternative pins. To do this with CubeMX, you first have to assign the pin and long click on the pin with the Ctrl key (at least 0.5s). The alternative pin then flashes and you can move the function from the first pin there.

Good luck!

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks for your answer Steve! Hope the misprint is fixed as I did influence my decision in ordering this variation but I will know in future to read the datasheet as my key point of reference.

Once again appreciate your time into writing a reply and settling my confusion 🙂