2025-06-06 6:59 AM
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
2025-06-06 8:54 AM
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?
2025-06-06 9:13 AM
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.
2025-06-06 8:59 PM
2025-06-06 9:01 PM - edited 2025-06-06 9:32 PM
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.
2025-06-10 1:36 AM - last edited on 2025-06-10 1:48 AM by Andrew Neil
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);
}
}
2025-06-10 1:46 AM
@Ronik_123 @renziiiii - Please see How to insert source code.
I've edited @renziiiii's post to show how it should look.
2025-06-10 10:29 AM
Not really learning much from the linker file.
You have SCB->VTOR set to zero, which would then be dependent on what memory maps at zero currently, ie RAM, ROM, or FLASH
Better that you explicitly set SCB->VTOR to 0x08000000 (or your vectors address) in SystemInit() code.
2025-06-12 11:18 PM
Hi Tesla,
In our case it is pointing to flash base address, i.e. 0x8000000.
Is there any chances of systick malfunctioning with Debug Mode enabled?
Regards
2025-06-20 12:07 AM
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