Skip to main content
FWebe.3
Associate
June 25, 2021
Solved

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

  • June 25, 2021
  • 3 replies
  • 1202 views

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

This topic has been closed for replies.
Best answer by Olivier GALLIEN

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

3 replies

Olivier GALLIEN
Technical Moderator
June 25, 2021

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
FWebe.3Author
Associate
June 25, 2021

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
Olivier GALLIENBest answer
Technical Moderator
June 28, 2021

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.