Skip to main content
ranran
Senior
Feb 4, 2019 7:25 AM UTC
Solved

change default value of pins (gpio) in cubeMX

Hello,

I searched in cubemx where to change the default value of gpio pins, but couldn't find it.

Does anyone knows ?

 In generated code, all output gpio are set to 0, for example :

HAL_GPIO_WritePin(GPIOK, SW_LED1_Pin, GPIO_PIN_RESET);

Thanks,

ranran

This topic has been closed for replies.
Mohamed Aymen HZAMI
ST Employee
Feb 4, 2019 1:31 PM UTC

Hello ranran,

You can select the status of the GPIO pin (GPIO_PIN_RESET / GPIO_PIN_SET) by setting the GPIO output level to Low or High, as shown in the figure below.

 0690X000006DN98QAG.png

Best Regards,

Mohamed Aymen.

1 reply

Mohamed Aymen HZAMI
ST Employee
Feb 4, 2019 1:31 PM UTC

Hello ranran,

You can select the status of the GPIO pin (GPIO_PIN_RESET / GPIO_PIN_SET) by setting the GPIO output level to Low or High, as shown in the figure below.

 0690X000006DN98QAG.png

Best Regards,

Mohamed Aymen.