Skip to main content
ranran
Senior
February 4, 2019
Solved

change default value of pins (gpio) in cubeMX

  • February 4, 2019
  • 1 reply
  • 3092 views

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.
Best answer by Mohamed Aymen HZAMI

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
February 4, 2019

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.