Why is the button always read as 1, regardless if the button is pushed or not, has an onboard pull-upresistor if(HAL_GPIO_ReadPin(GPIOx, B1_Pin == 0)){...
With respect, this is a FreeRTOS forum, not a general programming forum, and to keep this resource valuable to our users it is important this remains the case. Your question does not appear to be related to FreeRTOS in any way, so in future I would appreciate it if you were to post similar such questions to a more appropriate forum - such as a general programming news group, stack overflow, or in this particular case, the ST forum as you appear to be asking a question about their drivers.