Skip to main content
SPati.3
Associate
March 6, 2020
Question

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

  • March 6, 2020
  • 7 replies
  • 2211 views

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.

This topic has been closed for replies.

7 replies

Mike_ST
ST Technical Moderator
March 6, 2020

Maybe there are some solder bridges to configure:

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
SPati.3
SPati.3Author
Associate
March 6, 2020

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 Technical Moderator
March 6, 2020

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
SPati.3
SPati.3Author
Associate
March 6, 2020

0690X00000DYsw4QAD.jpg

SPati.3
SPati.3Author
Associate
March 6, 2020

This is the configuration of SPI1 pins used.

waclawek.jan
Super User
March 6, 2020

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

JW

AYoun
Visitor II
July 2, 2020

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