2020-04-06 06:27 PM
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.
Solved! Go to Solution.
2020-04-06 10:51 PM
Enable TIM15 clock in the respective RCC_APBxENR. See RCC chapter in RM.
JW
2020-04-06 10:51 PM
Enable TIM15 clock in the respective RCC_APBxENR. See RCC chapter in RM.
JW
2020-04-07 06:06 PM
Thank you so much. That's why the problem was.
Jace