cancel
Showing results for 
Search instead for 
Did you mean: 

How can I awake TIM15,16,17 ?

Jace
Associate II

Hello,

I'm using STM32F302R8T6. 

I generated the code by CubeMX and using IAR compiler.

At first, TIM1,2 is working well. But TIM15,16,17 is not working.

So, I tried to access direct the register as next code.

while (1)

{

TIM1->CR1 = 0xffff;

TIM2->CR1 = 0xffff;

TIM15->CR1 = 0xffff;

//(*(volatile unsigned *)0x40014000) = 0xffff;

printf("TIM1:%X,TIM2:%X,TIM15:%X\r\n",TIM1->CR1,TIM2->CR1,TIM15->CR1);

HAL_Delay(100);

}

The result of above in serial terminal is attached picture.

"TIM1:BEF,TIM2:BEF,TIM15:0"

(TIM1 & 2 was changed by code but TIM15 is always zero)

In my attempt, no method worked.

Please help me.​

  

1 ACCEPTED SOLUTION

Accepted Solutions

Enable TIM15 clock in the respective RCC_APBxENR. See RCC chapter in RM.

JW

View solution in original post

2 REPLIES 2

Enable TIM15 clock in the respective RCC_APBxENR. See RCC chapter in RM.

JW

Jace
Associate II

Thank you so much. That's why the problem was.

Jace