cancel
Showing results for 
Search instead for 
Did you mean: 

SysTick_Handler(void) not getting called with STM32L431CBT6

DKhan.1
Associate II

Hi Everyone, I am working with STM32L431CBT6 and STM IDE cube 1.14. I am currently facing the problem that the HAL_delay function is not working. on investigating further I found that SysTick_Handler(void) is never getting called and thus "uwTick" is never getting incremented. 

DKhan1_0-1701460683771.png

I have seen that the systick is working but when ever the counter reaches zero, an interrupt is raised but soon the Stlinl-V3 debugger hangs and restarts.  

DKhan1_1-1701460976966.png

But if I run the systick without raising interrupt everything works, the counter reloads and starts again. 

I guess the issue is with the location of the interrupt, IRQ is going to a wrong location. I there a way that overwrite the default irq function and write my own. 

Thanks for the help in advance.

Kind regards,

Dibyendu

5 REPLIES 5
DKhan.1
Associate II

The solution provided by Xme helped. But to figure this out was a few days work for me. May be a permanent solution can be found.

DKhan1_0-1701462621113.png

 

Is this a custom board?

Is BOOT0 pulled LOW ?

Is there a boot loader at 0x08000000 and an app somewhere deeper in FLASH ?

Doesn't SCB->VTOR normally get set in SystemInit() ?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Tinnagit
Senior II

in stm32xxxx_t.c
you should found SysTick_Handler and it maybe have no HAL_SYSTICK_IRQHandler(); 

void SysTick_Handler(void)
{
/* USER CODE BEGIN SysTick_IRQn 0 */

/* USER CODE END SysTick_IRQn 0 */
HAL_IncTick();
/* USER CODE BEGIN SysTick_IRQn 1 */
HAL_SYSTICK_IRQHandler();
/* USER CODE END SysTick_IRQn 1 */
}

 

and after this, the HAL_SYSTICK_Callback in main.c should be active
/**
* @brief SYSTICK callback
* @PAram None
* @retval None
*/
void HAL_SYSTICK_Callback(void)

Nitin
Associate III

Hi, I am getting similar problem in below setup:

1. Device is STM32U585.

2. ST provided BL is being used in the project.

3. This Project is TFM enabled.

4. Application is using threadX in non-secure zone.

 

My problem seems as same as below screenshot.

Nitin_0-1705784586331.png

I have spent enough time on this and now got completely blank. Looking out for immediate support from #ST #STM32U5 #SysTick

 

Any help will be much appreciated.

>> Looking out for immediate support..

It is the weekend

The Vector Table is defined via SCB->VTOR, this address typically needs 512-byte alignment, depending on the number of vectors.

The table could be in RAM, you could change individual vectors that way.

The main vector list will be in startup.s make sure you have the name of the functions there, and that you get linkage. Watch C++ / .CPP name mangling if using those.

Watch SystemInit() configuration of SCB->VTOR if deeped in memory. A smarter method is to use linker symbols to assign the address based on the build settings.

If _disable_irq() is used in the loader, you'll need to re-enable

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..