AnsweredAssumed Answered

timer interrupt doesn't start before FreeRTOS osKernelStart

Question asked by TONYY on Jun 13, 2017

The device is STM32F767NI

The code sequence :

{

... 

HAL_Init();

SystemClock_Config();

...

osKernelStart();

for (;;);

}

I set up TIM14 to have 1ms period interrupt. The interesting thing is, before osKernelStart(), The interrupt isn't called at all.

if I comment out the osKernelStart(), it will never been called.

I checked the register with debugger. the value before osKernelStart() and after are the same. but interrupt begin to act normally after osKernelStart().

0x40002000 (TIMx_CR1) = 1 <= counter enabled.

0x4000200c (TIMx_DIER) = 1 <= interrupt enabled.

0x40002010 (TIMx_SR) = 3 <= interrupt pending.

0x40002024 (TIMx_CNT) = random value <= counter is counting.

0xe000e104 (NVIC_ISR1) = 0x2000 <= TIM8_TRG_COM_TIM14 enabled. 

0xe000e42c (NVIC_IPR11) = 0x5000 <= Priority set to 0x50.

The timer should not have dependency with FreeRTOS. but it will only work after osKernelStart(). Did I miss anything?

 

Regards,

Tony

Outcomes