cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB55 GPIO alternative SPI2(GPIO_AF3_SP2 vs GPIO_AF5_SPI2).

Lep
Senior

STM32WB55RGV6 connects ADS1299 by spi. And I choose spi2. There are three signas miso\ mosi and sck. SPI2 has two alternative: GPIO_AF3_SP2 and GPIO_AF5_SPI2.

① STM32CUBEMX automatically generated miso(GPIO_AF3_SP2), mosi and sck(GPIO_AF5_SPI2).Initialization is ok, but no data.

② All ​GPIO_AF3_SP2. Initialization is failed and application crash.

③​ All ​GPIO_AF5_SP2. Successfully.

Although the result is good, I do not understand why:sad_but_relieved_face:

1 ACCEPTED SOLUTION

Accepted Solutions

Which pins?

Look at the Alternate functions table in the datasheet to determine, which AF number to use for each pin.

For example:

0693W00000NpiP4QAJ.png 

JW

View solution in original post

2 REPLIES 2

Which pins?

Look at the Alternate functions table in the datasheet to determine, which AF number to use for each pin.

For example:

0693W00000NpiP4QAJ.png 

JW

Lep
Senior

Thank you,I found the error,SCK(PD1), GPIO_AF5_SPI2.