cancel
Showing results for 
Search instead for 
Did you mean: 

Routing Interface (RI)

wynand
Associate II
Posted on May 07, 2013 at 14:58

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.

Wynand
1 REPLY 1
daviddavid93
Associate II
Posted on June 10, 2013 at 14:31

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