0
\$\begingroup\$

I am trying to toggle the GPIO port 8 with:

HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
HAL_Delay(1000);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);

When I debug the application I can see, that the HAL_Delay does not work. I'm not sure if I missed a configuration option in the STM32CubeIDE to enable the SysTick.

Does anyone use STM32CubeIDE and can give me a hint?

enter image description here

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Is the code executing in ISR? \$\endgroup\$ – Marko Buršič Jun 15 at 12:34
  • \$\begingroup\$ I don't think so. But I did not find the right option to enabel it \$\endgroup\$ – Pascal Jun 15 at 12:35
  • \$\begingroup\$ The problem is that SYSTICK only works while not debugging. If you run it works fine, but if you step through the code, the interrupt is not called which updates the SYSTICK counter. It's very annoying indeed. \$\endgroup\$ – Michel Keijzers Jun 15 at 13:58
  • \$\begingroup\$ @MichelKeijzers Is this a general "problem" with stm32 mcus or just with STM32Cube Ide? \$\endgroup\$ – Pascal Jun 15 at 14:04
  • 2
    \$\begingroup\$ "HAL_Delay does not work" is not much of a problem description. Does your code get stuck in HAL_Delay, or does it appear to simply skip over HAL_Delay? \$\endgroup\$ – brhans Jun 15 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.