Skip to main content
Associate II
June 6, 2025
Question

Systick Interrupt issue

  • June 6, 2025
  • 4 replies
  • 979 views

Hello Team,

I am currently working on STM32WLE5 microcontroller and getting issue in HAL_Delay(), it got stuck, ifound that systick interrupt was not generating. In main() function, I start with HAL_Init() and then HAL_Delay(500) and controller get stuck sometimes, the only way out was multiple reset. I have gone through many forums but didn't get exact the solution.

Thanks & Regards

Rohan

4 replies

Tesla DeLorean
Guru
June 6, 2025

What are you doing with the BOOT0 pin in your design? Letting it Float? Pulled Low?

>>I have gone through many forums but didn't get exact the solution.

Yeah, that seems like stabbing in the dark, and you don't enumerate WHAT you did try, and what OBSERVATIONs you made, so we learn nothing.

Identify why it's not interrupting.

Is it loading SCB->VTOR correctly? What's the NVIC and SCB->VTOR showing in working vs not-working situations?

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Ronik_123Author
Associate II
June 7, 2025

Hi Tesla,

What are you doing with the BOOT0 pin in your design? Letting it Float? Pulled Low?

-> It is being Pulled low.

Is it loading SCB->VTOR correctly? What's the NVIC and SCB->VTOR showing in working vs not-working situations

->We will try to analyse this when the non working  condition occurs again. For your reference I have attached snap of VTOR value when in working condition and linker file of code.

 

Visitor II
June 10, 2025

Hi Tesla,

Did you get a chance to look into linker file? Can you please check it?

Any possible reason behind the systick interrupt not working?

Actually we are using the HAl_Delay as per below,

void HAL_Delay(__IO uint32_t Delay)
{
 if (SYS_TimerInitialisedFlag == 0)
 {
 // Here call the weak function 
 Weak_HAL_Delay(Delay);
 }
 else
 {
 TIMER_IF_DelayMs(Delay);
 }
}
Based on systick before time base initialization and then moving to time base.
 
Thanks & Regards
Piyush

Edited to apply source code formatting - please see  How to insert source code for future reference.
Karl Yamashita
Principal
June 6, 2025

You haven't shown any code so we don't know how you've used HAL_Delay. So i'll take a stab.

Some people mistakenly place HAL_Delay in a interrupt routine, which will get stuck.

If that is the case, you need to rethink on how to do the minimum in the interrupt and exit right away. That way other interrupts  like Systick can interrupt. Do the processing of data outside of the interrupt. Or change the interrupt priorities. 

If that is not the case, then you need to show code. 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
Ronik_123Author
Associate II
June 7, 2025

Hello Karl,

 I have attached snap of my main function, which clearly shows that HAL_Delay is not in any ISR.

Andrew Neil
Super User
June 10, 2025

@Ronik_123 @renziiiii - Please see How to insert source code.

I've edited @renziiiii's post to show how it should look.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
ST Employee
June 20, 2025

Hello @Ronik_123,

This post has been escalated to the ST Online Support Team for additional assistance.  We'll contact you directly.

Best regards,
Maxime

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.