cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use SPI2 on PA12 PA11 PB15 with STM32H743

SwedenSven
Associate II

Hi,

created some SPI2-slave code running on PB10(SCK), PB12(NSS) and PC3(MOSI) without problem. Needed to move SPI2 to other pins as PB12 will be used by RMII in later design. Decided to use PA12(SCK), PA11(NSS) and PB15(MOSI). SCK is running at 12.288MHz. Data is transfered to memory by DMA. Package is an LQFP144 on a Nucleo board. USB function is disabled in STMCube. Alternate function for PA11, PA12 and PB15 is properly reconfigured in own init function (not using STMCube).

Wondering if there is something special about the GPIO pins related to USB compared to other IO-pins.

Switching back to former pin configuration works as it should.

Im wondering what I'm missing to get it working. Im very appreciating any ideas on that topic.

Thanks in advance!

4 REPLIES 4
TDK
Guru

There's nothing special about them. They're connected to the USB connector but that shouldn't affect things here unless you have a cable plugged into it. Show some code. Do they work as GPIO pins?

If you feel a post has answered your question, please click "Accept as Solution".
SwedenSven
Associate II

Hi TDK, thanks for your response. Configuring PA8-12 as output (GPIO) and toggling works for PA8-10 but not PA11-12. Checking the output data registers in debugger shows that all bits (8-12) are toggling properly. VDD33USB is connected to 2.5V supply as the connected peripheral requires this. Shouldn't be a problem as USB is not used. The power register PWR_CR3 bits related to VDD33USB are 0 as verified with debugger.

The connected peripheral connected is an ADC and signal levels and timing looks good so the transient suppression assigned to USBDM and USBDP doesn't seem to influence the signal integrity. The only thing we noticed is that the mode register has a slightly different reset state for port A and B compared to the other ports. But this is corrected by reinitialization. Do you have any further ideas?

TDK
Guru

Are you accessing them on CN12? Did you close SB16/SB17? The user manual could be more clear about this, but it does mention them.

0693W00000D2JyBQAV.png 

If you feel a post has answered your question, please click "Accept as Solution".
SwedenSven
Associate II

Okay, found the problem. SB16 and 17 were not assembled on the Nucleo board. This disconnects the morpho connector from the MCUs IO-pins.

Thank you for your help TDK. Saw your answer a little after my reply.

Regards

Sven