cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO "user labels" are not always defined in main.h

JVERN.18
Associate III

Hello,

When you associate a "user label" with a GPIO (for example DEBUG1 associated with PB11), the associated constants are sometimes not defined in the main.h file (but sometimes yes). When it is not, the associated initialization of the port is also not done in MX_GPIO_Init (). In the same project, some GPIOs are well defined and initialized and others are not.

In my case, this problem arises with STM32H7xx. I had no problem so far with user labels; I did not check if the problem now arises with old projects with other processors ...

I have the impression that it depends on the history of modification of the pins, on whether the project was made from template or not, and I don't know what ...

Otherwise, in the case of dual core processor (STM32H745), one core has the constants associated with the GPIO user labels in its main.h file (but not always), the other does not, which is annoying because a priori the two cores are likely to access ports ...

This problem is in addition to other problems related to code generation in version 5.4.0 & 5.5.0:

- wrong positioning of the DMA initialization

- inability to change the order of initializations in "Advanced Settings"

Best regards

Jean-Louis

1 REPLY 1
JVERN.18
Associate III

Oops, I think I spoke too quickly. My problem comes from the context assignment parameter which I did not configure.

The fact remains that it is not possible to assign a GPIO to both the M7 and M4 context (we can imagine, for example, that we want to read the state of the same entry with the two cores).