Step 2, LED Blinking with STM32F769I-Discovery
Dear community,
I am totaly new and trying to get some idea on STM32F7...board
I've got opened an example project, provied within IDE. If I compile code and download it to MCU, everything works fine: 2 LEDs are blinking:
This is the main code for LEDs blinking within main function:
while (1) {
while (Buttons_GetState() & 1U); /* Wait while holding USER button */
osSignalSet(tid_Thread_LED, 1U); /* Signal LED thread */
osDelay(100); /* Wait 500ms */
}
It does blink, when no button is pressed.
in order to get better understanding in MCUs I am trying to simplyfiy the code and change it in the following way:
while (1) {
if(mytempV %2 == 0){
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_9,GPIO_PIN_RESET);
}
else {
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_9,GPIO_PIN_SET);
}
mytempV++;
osDelay(500); /* Wait 500ms */
}
I have expected that one of LED will start blinking. I checked in manual that red LED seets on Port B pin 9:

However, nothing was happening.
If I use
while (1) {
HAL_GPIO_TogglePin (GPIOB, GPIO_Pin9 )
osDelay(500); /* Wait 500ms */
}
result is the same: nothing.
What could be the reason for that?
Shouuld I allow somwhere independently the GPIOs to be changed?
or I messed up with use of osDelay()?
Best regards,
Ivan.
