cancel
Showing results for 
Search instead for 
Did you mean: 

Generating code for SPI using DMA issue

AGutm.1
Associate

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?

1 ACCEPTED SOLUTION

Accepted Solutions
crwper
Senior

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

View solution in original post

2 REPLIES 2
crwper
Senior

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
Associate

Thanks a lot Michael!

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