cancel
Showing results for 
Search instead for 
Did you mean: 

timer3

arkady
Associate II
Posted on July 20, 2005 at 08:35

timer3

1 REPLY 1
arkady
Associate II
Posted on July 20, 2005 at 08:35

Hi I'am trying to run the timer3 on the STR710-EVAL board as

TIM_PWMOModeConfig ( TIM3, 0x012b, TIM_HIGH, 0x012b, TIM_LOW );

But i not receive on pin 73/ P1.2 the clk. :(

When i try to run Timer1,or Timer2 it work and i receive on pins P1.7 and P0.13 clk.

below a code that i use:

int main(void)

{

#ifdef DEBUG

debug();

#endif

/* Configure FCLK = RCLK */

RCCU_FCLKConfig ( RCCU_DEFAULT );

// Disable clock division by 2

RCCU_Div2Config(ENABLE);

// Gets the Div2 Flag status

while (RCCU_Div2Status() == RESET);

/* Configure the PLL1 ( * 12 , / 4 ) */

RCCU_PLL1Config (RCCU_PLL1_Mul_12, RCCU_Div_4) ;

/* Wait PLL to lock */

while(RCCU_FlagStatus(RCCU_PLL1_LOCK)==RESET);

// RCCU_RCLKSourceConfig (RCCU_RCLKClockSource ());

RCCU_RCLKSourceConfig (RCCU_PLL1_Output);

RCCU_PCLKConfig(RCCU_DEFAULT);

RCCU_MCLKConfig(RCCU_DEFAULT);

/*********************************************************/

Freq = RCCU_FrequencyValue ( RCCU_PCLK );

EIC_Init();

GPIO_Config(GPIO1, 0x0002, GPIO_AF_PP);

GPIO_WordWrite(GPIO1, 0x0000);

/* Initialize the Timer 3 registers to reset values */

TIM_ClockSourceConfig(TIM3, TIM_INTERNAL);

TIM_Init ( TIM3 );

EIC_IRQChannelConfig( T3TIMI_IRQChannel, ENABLE );

EIC_IRQChannelPriorityConfig( T3TIMI_IRQChannel , 1);

EIC_IRQConfig( ENABLE );

TIM_Init ( TIM3 );

TIM_PrescalerConfig ( TIM3, 0x01 );

TIM_ITConfig ( TIM3, TIM_OCB_IT, ENABLE );

TIM_ITConfig ( TIM3, TIM_OCA_IT, ENABLE );

TIM_PWMOModeConfig ( TIM3, 0x012b, TIM_HIGH, 0x012b, TIM_LOW );

TIM_CounterConfig (TIM3,TIM_START);

// Infinite loop

while(1);

}

Thanks for ....