2013-05-07 05:58 AM
I am using the STM8L151C6T6. I would like to route PD6 to TIM1 Input Capture IC2. The following code executes but does not change the RI_ICR1 register value and the routing does not take place either.
GPIO_Init(PORT_D, P_6, GPIO_Mode_In_FL_No_IT); SYSCFG_RIDeInit(); RI->ICR1 = (uint8_t)0x0A; Can anybody tell me what I need to do to route pins to TIM1 input capture as per Table 27 of RM0031? Any help will be greatly appreciated. Wynand2013-06-10 05:31 AM
Hi,
Here is a quote from the STM8L Reference Manual, that probably explains this: The RI registers can be accessed only when the comparator clock is enabled by setting the PCKEN25 bit in the CLK_PCKENR2 register. I hope it helps. Vincent, Raisonance support team