2016-10-28 02:01 AM
Hello,
to start TIM3 with TIM2, I had to use ITR1 (TS=001) despite RM0313 Rev.5 Table 45 telling to use ITR0. The part in use is Rev.B with date code 324. I started with TS=000, as the reference manual implied, but the timer did not start. As last resort, I was on the way to test with the other ITRx values and had success with ITR1. ITR2/3 do not succeed. Here are the register values before and after the start of TIM2. gdb) p /x TIM2 $15 = 0x40000000 (gdb) p /x *TIM2 $16 = {CR1 = 0x0, CR2 = 0x10, SMCR = 0x0, DIER = 0x0, SR = 0x0, EGR = 0x0, CCMR1 = 0x68, CCMR2 = 0x6800, CCER = 0x1001, CNT = 0x0, PSC = 0x0, ARR = 0x11f, RCR = 0x0, CCR1 = 0x1, CCR2 = 0x0, CCR3 = 0x0, CCR4 = 0x1, BDTR = 0x0, DCR = 0x0, DMAR = 0x0, OR = 0x0} (gdb) p /x *TIM3 $17 = {CR1 = 0x0, CR2 = 0x0, SMCR = 0x16, DIER = 0x0, SR = 0x0, EGR = 0x0, CCMR1 = 0x0, CCMR2 = 0x6800, CCER = 0x1000, CNT = 0x0, PSC = 0x0, ARR = 0x11f, RCR = 0x0, CCR1 = 0x0, CCR2 = 0x0, CCR3 = 0x0, CCR4 = 0x1, BDTR = 0x0, DCR = 0x0, DMAR = 0x0, OR = 0x0} ( #stm32f3732016-10-31 03:24 AM
I don't have a '373, but tried to compare the abovementioned table from RM with table 13 in AN4651 rev.1 - and I am thoroughly confused.
In that table, TIM2 as master is for TIM3_ITR1 slave, which is consistent with your finding. But there are two masters (TIM1 and TIM19) for TIM3_ITR0, for example (and there are more such). Also, in the RM, Tab 45 mentions TIM21 and TIM22, but there appear to be no such in 'F373...? JW