Skip to main content
AGutm.1
Associate
February 12, 2020
Solved

Generating code for SPI using DMA issue

  • February 12, 2020
  • 2 replies
  • 935 views

Hi,

I'm working on NUCLEO-H743ZI board, using the STM32CubeMX 5.4.0 tool.

When i'm generating code for SPI using DMA - It seems that it doesn't work.

I tried to generate the same code for another device (STM32F411 Discovery Board) and i sow that there is a difference between this two components in the initialization order:

STM32F411

MX_DMA_Init();

MX_SPI1_Init();

NUCLEO-H743ZI

MX_SPI1_Init();

MX_DMA_Init();

When I switched between these two functions it seems that the problem solved.

is it a bug in the IDE?

This topic has been closed for replies.
Best answer by crwper

This is a problem with the older version of STM32CubeMX, but I believe it's been solved recently with a patch. In the older version, you can also solve the problem by manually changing initialization order as described, e.g., in the comments here:

https://community.st.com/s/question/0D50X0000BvjWnfSQE/bug-in-cubemx-code-generation-for-spidma

Michael

2 replies

crwper
crwperBest answer
Senior
February 12, 2020

This is a problem with the older version of STM32CubeMX, but I believe it's been solved recently with a patch. In the older version, you can also solve the problem by manually changing initialization order as described, e.g., in the comments here:

https://community.st.com/s/question/0D50X0000BvjWnfSQE/bug-in-cubemx-code-generation-for-spidma

Michael

AGutm.1
AGutm.1Author
Associate
February 13, 2020

Thanks a lot Michael!

I manually changed the initialization order as described in link...