Skip to main content
Lep
Senior
March 10, 2022
Solved

STM32WB55RGV6 Can pin PC15 be used as the NSS(software) for the SPI bus? Pin PC10 and PC6 are ok. But pin PC13,PC14,PC15 doesn't work.

  • March 10, 2022
  • 2 replies
  • 1304 views

My configuration is shown below:

 gpioinitstruct.Pin  = SD_CS_PIN;

 gpioinitstruct.Mode  = GPIO_MODE_OUTPUT_PP;

 gpioinitstruct.Pull  = GPIO_PULLUP;

 gpioinitstruct.Speed = GPIO_SPEED_FREQ_LOW;

 HAL_GPIO_Init(SD_CS_GPIO_PORT, &gpioinitstruct);

This topic has been closed for replies.
Best answer by TDK

PC14 and PC15 aren't connected to an output on that board by default. Need to close some solder bridges and remove the LSE crystal.

0693W00000Kc84DQAR.png 

0693W00000Kc89MQAR.png 

PC13 should work as far as I can tell, if it's not being used by the RTC.

2 replies

TDK
Super User
March 10, 2022

> Can pin PC15 be used as the NSS(software) for the SPI bus?

Yes, it's a GPIO pin and you can toggle it.

PC15 has limited current capability, but shouldn't be an issue for a CS pin.

See notes in datasheet on PC15. RTC settings will override GPIO settings.

0693W00000Kc2h8QAB.pngAlso ensure PC15 on your board is free and not acting as OSC32_OUT.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Lep
LepAuthor
Senior
March 10, 2022

0693W00000Kc2s1QAB.jpg0693W00000Kc2saQAB.pngLSE is disable.My test includes P_Nucleo_WB55 and a TF card module.I use FATFS in spi mode.I use the example program which named FatFs_uSD_Standalone.I just changed the SD_CS_PIN and the gpio configuration. I don't kown why it doesn't work.

When i use pin PC10 and PC6, it's work well.But when i use pin PC13, PC14, PC16, it's doesn't work in same gpio configuration:GPIO_MODE_OUTPUT_PP, GPIO_SPEED_FREQ_LOW,GPIO_SPEED_FREQ_LOW.

I have see notes in datasheet: LSE is disable and the gpio's speed is low.`Is there anything else I need to do?

Lep
LepAuthor
Senior
March 10, 2022

PC13 PC14 PC15(NOT PC16)

TDK
TDKBest answer
Super User
March 10, 2022

PC14 and PC15 aren't connected to an output on that board by default. Need to close some solder bridges and remove the LSE crystal.

0693W00000Kc84DQAR.png 

0693W00000Kc89MQAR.png 

PC13 should work as far as I can tell, if it's not being used by the RTC.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Lep
LepAuthor
Senior
March 10, 2022

Thank you.This problem has been bothering me for several days:beaming_face_with_smiling_eyes: