I working with STM32F767BI and MikroC v6.2.0
I can't able to generate PWM on p4-p5, but I have been succeeded to generate on p1-p3.
when typing _GPIO_MODULE_TIM and pressing [Crtl]+[Space] I can't find appropriate module pinout for p4 and p5 in list available module pinouts, how can I find it?
here is the code I coded to generate pwm on p1 and p2.
Code: Select all
unsigned int current_duty, current_duty1;
void main() {
current_duty = PWM_TIM1_Init(40000);
current_duty1 = PWM_TIM2_Init(40000);
PWM_TIM1_Set_Duty(current_duty/2,_PWM_NON_INVERTED,_PWM_CHANNEL1);
PWM_TIM2_Set_Duty(current_duty1/2,_PWM_NON_INVERTED,_PWM_CHANNEL3);
PWM_TIM1_Start(_PWM_CHANNEL1, &_GPIO_MODULE_TIM1_PE9);
PWM_TIM2_Start(_PWM_CHANNEL3, &_GPIO_MODULE_TIM2_PB10 );
while(1){
}
}