cancel
Showing results for 
Search instead for 
Did you mean: 

SPI1 on pins PA5, PA6, PA7 does not transmit and receive data when used in DMA enabled mode for NUCLEO-F303RE.

SPati.3
Associate II

I am trying to get the SPI communication with DMA enabled mode for STM32F303 controller using nucleo board NUCLEO-F303RE. For this, I am using one board as SPI master and other as SPI slave.

  • Pin connections on hardware (as per nucleo board):
  1. Pin 8 on CN7 (on master) - Pin 8 on CN7 (on slave) --> GND
  2. Pin 11 on CN10 (on master) - Pin 1 on CN7 (on slave) --> SCK
  3. Pin 13 on CN10 (on master) - Pin 2 on CN7 (on slave) --> MISO
  4. Pin 15 on CN10 (on master) - Pin 3 on CN7 (on slave) --> MOSI

On master side, I configured SPI1 and on slave side, I used SPI3 as per our requirement.

I used STM32 Cube based HAL example code available in the folder \en.stm32cubef3\STM32Cube_FW_F3_V1.11.0\Projects\STM32F303RE-Nucleo\Examples\SPI\SPI_FullDuplex_ComDMA\EWARM and modified it to use for SPI1 (on master side) and SPI3 (on slave side).

The observation is, with this configuration, I am not able to transmit anything from master to the slave and thus not able to get data back as well.

Few observations :

  1. SPI1 available on other pins PB3, PB4, PB5 works successfully on master and properly establishe the data exchange. - No problem here !!
  2. SPI2 , SPI3 when used on master side available on various pins works as per expectation and there is no problem with SPI communication (DMA enabled.)
  3. Only there is some issue in communication with SPI1 pins (PA5, PA6, PA7) as observed.

Note: I used the example code as it is at first to verify above details which checks the two way full duplex communication.

Also, I tried with only data transmission from master (by using Tx Complete callback) and reception on slave (by using Rx Complete callback). But also failed to achieve the result.

Wanted to have help on SPI1 (DMA enabled) configuration with pins PA5, PA6 and PA7.

7 REPLIES 7
Mike_ST
ST Employee

Maybe there are some solder bridges to configure:

Check MB1136 schematic. close SB40,SB41,SB42, open SB20,SB24,SB29

SPati.3
Associate II

SB40, SB41, SB42 are closed as I could see on Nucleo board, and even SB20, SB24, SB29 are seen to be open.

Do I need to configure them in program by any means?

Mike_ST
ST Employee

Check the HAL_SPI_MspInit( ) function in stm32f3xx_hal_msp.c and reroute the SPI1 to te right pins if not done.

SPati.3
Associate II

0690X00000DYsw4QAD.jpg

SPati.3
Associate II

This is the configuration of SPI1 pins used.

Read out and check/post relevant GPIO and SPI registers content.

JW

AYoun
Associate

Was this issue ever resolved? I'm seeing similar issues using SPI1 DMA Tx, no output on pins...