STM32F103RBT6 TIM2 PWM notwork
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-30 12:15 AM
Posted on March 30, 2018 at 09:15
hi
i write this code for TIM2 CH3 PWM generation GPIOB.10
but it not works
can help too me ....
BEST regards
// RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
//// GPIO_StructInit(&port);// port.GPIO_Mode = GPIO_Mode_AF_PP;// port.GPIO_Pin = GPIO_Pin_10;// port.GPIO_Speed = GPIO_Speed_10MHz;// GPIO_Init(GPIOB, &port);//// TIM_TimeBaseStructInit(&timer);// timer.TIM_Prescaler = 720;// timer.TIM_Period = 1000;// timer.TIM_ClockDivision = 2;// timer.TIM_CounterMode = TIM_CounterMode_Up;// TIM_TimeBaseInit(TIM2, &timer);//// TIM_OCStructInit(&timerPWM);// timerPWM.TIM_Pulse = 15;// timerPWM.TIM_OCMode = TIM_OCMode_PWM1;// timerPWM.TIM_OutputState = TIM_OutputState_Enable;// timerPWM.TIM_OCPolarity = TIM_OCPolarity_High;// TIM_OC3Init(TIM2, &timerPWM);//// TIM_Cmd(TIM2, ENABLE);#tim-pwm #stm32 #timer #pwm #timer2 #notworking #bug?
Labels:
- Labels:
-
Bug-report
-
TIM
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-30 1:30 AM
Posted on March 30, 2018 at 10:30
Check what AFIO_MAPR register can do for you. Using PB10 for TIM2_CH3 is not the default configuration.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-30 11:14 AM
Posted on March 30, 2018 at 18:14
can edit this register with spl ?
do you know function for it ?
can sent me sample code frome it ?
