2021-02-10 10:13 AM
The GPIO clock is the only code that seemed to be generated under the initialization function. the other necessary code such as the following was not created.
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_InitStruct.Pin = GPIO_PIN_8;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
In the setup GUI I had selected the pin PC8, and set it to a GPIO_Output yet the above code was not generated.
Solved! Go to Solution.
2021-02-12 07:26 AM
Hi @DMAYE.1 ,
Thanks for the share of your ioc file which allowed me to know the main reason of the GPIO configuration code disappearance.
In fact, in the case of the stm32H7 Dual Core , when the pin is not linked to an IP that we have already started its activation by choosing on which cortex it is assigned, this pin remains free, i.e, it does not know on which cortex it is up to.
For its configuration to be correctly generated, you have to choose the cortex of this pin by right click on the pin, click on the Pin Reservation and then check one of the two cortex.
Once you generate your project, you will find the complete GPIO code in the /*Configure GPIO pin : PC8 */ section under main.c/MX_GPIO_Init function :) .
Hope my answer helped you, when your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Thanks for your contribution, Khouloud
2021-02-10 11:49 AM
Never seen before. What tool / version ? What chip?
2021-02-10 07:40 PM
stm32 cube IDE
latest version I think 1.5.1
Nucleo-144 STM32H755ZI-Q
2021-02-10 11:10 PM
Hello @DMAYE.1
Thanks for your feedback,
Could you please share your ioc file to check your problem?
Thanks, Khouloud
2021-02-12 06:15 AM
2021-02-12 07:26 AM
Hi @DMAYE.1 ,
Thanks for the share of your ioc file which allowed me to know the main reason of the GPIO configuration code disappearance.
In fact, in the case of the stm32H7 Dual Core , when the pin is not linked to an IP that we have already started its activation by choosing on which cortex it is assigned, this pin remains free, i.e, it does not know on which cortex it is up to.
For its configuration to be correctly generated, you have to choose the cortex of this pin by right click on the pin, click on the Pin Reservation and then check one of the two cortex.
Once you generate your project, you will find the complete GPIO code in the /*Configure GPIO pin : PC8 */ section under main.c/MX_GPIO_Init function :) .
Hope my answer helped you, when your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Thanks for your contribution, Khouloud
2021-02-12 10:28 AM
Thank you so much. That is the issue. I was looking for the pin assignment under the system gpio tabs. It wasn't in that setup. And I think it should be. Thank you once again.
2021-02-14 11:05 PM
Always welcome @DMAYE.1 :)
Khouloud