cancel
Showing results for 
Search instead for 
Did you mean: 

Why gets the SPI DMA configuration lost when re-opening *.ioc with CubeMX (STM32MP1)?

JMein.1
Associate III

My problem is, that on the one hand, the SPI3 configuration is lost after I close CubeMX.

  1. The assignment is lost to the M4 core (changed from A7 to M4 and after reopening, its again at A7. The changes have been saved and tried on different machines).
  2. If the assignment of the DMA streams for the peripherals has been done, after reopening CubeMx and *ioc file, the DMA streams differ or are completely lost.

 

So, what I am doing wrong here? Is there maybe another problem with the GPIO or whatever, which can lead to this unexpected behaviour? Or is this a known issue?

 

Thank you for the help.

 

Best regards,

Jan-Otto

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @JMein.1​ ,

Yes I have explanation and workaround.

Problem com from that CubeMX does not handle properly the link between SPI3 and I2S3 instances.

Even if I2S3 is disable, it's by default assigned to A7NS context .. and in that case CubeMX don't accept SPI3 to be assigned to M4 context.

This assignment is reset to be aligned with I2S3 context when you open project.

It can be seen as well for SPI1 and SPI2, not for SPI4, SPI5 and SPI6 as they are not coupled with an I2S instance.

Workaround consist to untick I2S3 from A7NS context.

This is will be fixed in next CubeMX version.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

10 REPLIES 10
Olivier GALLIEN
ST Employee

Hi @JMein.1​ ,

can you please share CubeMX version and the MPU or Board project type reference in order I check at my end.

Thanks

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JMein.1
Associate III

Hello Olivier,

the CubeMX version is 6.2.1 and the board is a STM32MP1AACx. Can the *ioc file crash in that way, that this beaviour can occur?

So, nearly all pin are set to a value and also nearly all of the peripheral is used.

I can also share the *.ioc file but only as PN because this is a company project :)

Best regards,

Jan-Otto

Hi @JMein.1​ ,

Sorry "board is a STM32MP1AACx" .. missing 2 important digit : STM32MP1??AACx

And you talk about board, do you mean either a DKx or EV1 board from ST ?

Thanks for proposal to send the *.ioc. Maybe later depending on my finding.

Thx

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JMein.1
Associate III

Hi Olivier,

this is a custom productive board with a STM32MP151AACX.

Best regards,

Jan-Otto

Olivier GALLIEN
ST Employee

Hi @JMein.1​ ,

I didn't noticed any issue in Saving Project feature un CubeMX ( use the latest 6.3) but I doubt it can be the problem with 6.2.1.

My SPI3 and DMA settings are properly maintained after MX closure.

Are you sure your change are properly applied by MX and does not complain about any conflits in pin assignement ?

Anything preventing to modify the ioc itself on your station ? ( write protection )

Which OS are you using ?

For a trial, can you open the .ioc in an editor and monitor that its content is evolving along change and save operation in CubeMX ?

If no progress, please attach the ioc to a private message.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JMein.1
Associate III

Hello Olivier,

I sent you a private message with the *.ioc file. I think, this explains it more in detail and hopefully, you have a solution for my problem.

Best regards,

Jan-Otto

Hi @JMein.1​ 

I indeed reproduce this strange behavior with the provided ioc.

I'm escalating the point to some CubeMX expert.

Keep you posted

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JMein.1
Associate III

Hello Olivier,

can you please give me an update on this issue? I hope, you have a workaround for me or this will be fixed within a newer CubeMx version?

Best regards,

Jan-Otto

Hi @JMein.1​ ,

Yes I have explanation and workaround.

Problem com from that CubeMX does not handle properly the link between SPI3 and I2S3 instances.

Even if I2S3 is disable, it's by default assigned to A7NS context .. and in that case CubeMX don't accept SPI3 to be assigned to M4 context.

This assignment is reset to be aligned with I2S3 context when you open project.

It can be seen as well for SPI1 and SPI2, not for SPI4, SPI5 and SPI6 as they are not coupled with an I2S instance.

Workaround consist to untick I2S3 from A7NS context.

This is will be fixed in next CubeMX version.

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.