cancel
Showing results for 
Search instead for 
Did you mean: 

change default value of pins (gpio) in cubeMX

ranran
Senior II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Mohamed Aymen HZAMI
ST Employee

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.

View solution in original post

1 REPLY 1
Mohamed Aymen HZAMI
ST Employee

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.