cancel
Showing results for 
Search instead for 
Did you mean: 

Incomplete Code generation from the IDE for M4 co-processor with an STM32MP1

FWebe.3
Associate

I try to use the STM32MP1 in engeneering boot mode to develop the co-processor's firmware. Unfortunately the code generation is not complete, meaning initialization for all GPIO pins (exept MCO Pins) are missing. Is it possible to activate the code generation for the GPIO pins which are used only by the M4 co-processor?

Thanks an best regards

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

Hi @FWebe.3​ ,

For pins assigned to a peripheral, it's the allocation of the peripheral instance ( eg I2C or SPI ) to M4 context which trig the code generation.

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

3 REPLIES 3
Olivier GALLIEN
ST Employee

Hi @FWebe.3​ ,

I presume you are talking about code generation with CubeMX ?

For M4, after selecting GPIO input or output, you also have to right click on the pin and assign 'pin reservation' to 'Cortex-M4'.

M4 code will then be generated correctly.

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.
FWebe.3
Associate

Hi Olivier

Thanks for the fast answer.

The pin reservation is only selectable when the pin is used as input or output GPIO and not as an alternate function pin.

Can this also be done for pins used within peripherals like I2C or SPI?

Olivier GALLIEN
ST Employee

Hi @FWebe.3​ ,

For pins assigned to a peripheral, it's the allocation of the peripheral instance ( eg I2C or SPI ) to M4 context which trig the code generation.

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.