If a digital output pin value is changed multiple times within the same main loop, within the same interrupt, or within the same task and not separated by a delay then the output pin does not work as expected.This applies to both HAL_GPIO_TogglePin()...