Skip to main content
Jace
Associate II
Apr 7, 2020 1:27 AM UTC
Solved

How can I awake TIM15,16,17 ?

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.​

  

​

​

This topic has been closed for replies.
waclawek.jan
waclawek.janBest answer
Super User
Apr 7, 2020 5:51 AM UTC

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

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
Apr 7, 2020 5:51 AM UTC

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

JW

Jace
JaceAuthor
Associate II
Apr 8, 2020 1:06 AM UTC

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

Jace