Skip to main content
Esora.1
Associate
November 21, 2021
Question

SPI2 migrate from STM32H743XiHX to sPi32H743ViHx PC to PC_2

  • November 21, 2021
  • 2 replies
  • 852 views

I am trying to convert project file from STM32H743XiHX (265 pin package)to sPi32H743ViHx (100 pin package)

I use Spi (with DMA actice) 2 on original board and MISO and MOSI where connected to PC2 & PC3

on new Board MISO and MOSI of SPI2 are connected to PC2_C & PC3_C

My Spi IS not working.

I tried doing several tests:

1)I tried changing to regular GPIO and found that the output lines of the spi are active and i can touggle them.

2)I tried changing the analog switch as seen in datasheet and other example on the net like this :

HAL_SYSCFG_AnalogSwitchConfig(SYSCFG_SWITCH_PC2, SYSCFG_SWITCH_PC2_CLOSE);

HAL_SYSCFG_AnalogSwitchConfig(SYSCFG_SWITCH_PC3, SYSCFG_SWITCH_PC3_CLOSE);

Any suggestion why SPI is not working ?

This topic has been closed for replies.

2 replies

TDK
November 21, 2021

Check that clocks are enabled, pins set to correct mode, analog switches need to be closed if you are using the PCx_C pins.

Define what "not working" here means. Have you looked at the signal on the line using a logic analyzer or scope or are you inferring from some higher level behavior?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Esora.1
Esora.1Author
Associate
November 21, 2021

1)I have checked all 4 signals when configured as spi and no signal change.

2)when setting pins to gpio mode i toglled the signals on and off successfully.

3)i have tried to close the analog switche. Although i think cube-mx setttings should have done that automatically when i chose spi mode.

4)Only change i made is raplacing cpu package and porting from spi2 with pc2 and pc3 to spi2 with pc2_c and pc3_c​.

Spi3 for examplewas ported succesfuky and working with same configuration as spi2 (rate,dma settings,common infrastracture ..)​