We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Did anyone get any success using the Standard Peripheral Driver? Couldn't get an output for timer1 channel1 on pin PC6.
Chip : STM8S003F3P6 IDE : Arduino IDE 1.8.9
Code : void TIM1_Config(void) { TIM1_DeInit(); TIM1_TimeBaseInit(100, TIM1_COUNTERMODE_CENTERALIGNED3, 50, 0); TIM1_OC1Init(TIM1_OCMODE_PWM1, TIM1_OUTPUTSTATE_ENABLE, TIM1_OUTPUTNSTATE_DISABLE, 25, TIM1_OCPOLARITY_HIGH, TIM1_OCNPOLARITY_HIGH, TIM1_OCIDLESTATE_RESET, TIM1_OCNIDLESTATE_RESET); TIM1_Cmd(ENABLE); TIM1_CtrlPWMOutputs(ENABLE); }
void setup() { TIM1_Config(); pinMode(LED_BUILTIN, OUTPUT); }
void loop() { digitalWrite(LED_BUILTIN, LOW); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Did anyone get any success using the Standard Peripheral Driver?
Couldn't get an output for timer1 channel1 on pin PC6.
Chip : STM8S003F3P6
IDE : Arduino IDE 1.8.9
Code :
void TIM1_Config(void)
{
TIM1_DeInit();
TIM1_TimeBaseInit(100, TIM1_COUNTERMODE_CENTERALIGNED3, 50, 0);
TIM1_OC1Init(TIM1_OCMODE_PWM1,
TIM1_OUTPUTSTATE_ENABLE,
TIM1_OUTPUTNSTATE_DISABLE,
25,
TIM1_OCPOLARITY_HIGH,
TIM1_OCNPOLARITY_HIGH,
TIM1_OCIDLESTATE_RESET,
TIM1_OCNIDLESTATE_RESET);
TIM1_Cmd(ENABLE);
TIM1_CtrlPWMOutputs(ENABLE);
}
void setup() {
TIM1_Config();
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, LOW);
}
The text was updated successfully, but these errors were encountered: