Hi thank you for the spot.
I have edited my post.
PWM FC component for ESP ?
-
- Matrix Staff
- Posts: 2086
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 644 times
- Been thanked: 702 times
-
- Matrix Staff
- Posts: 1952
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 698 times
Re: PWM FC component for ESP ?
Sorry for the delay.
Hopefully should work for you now. Note you need to set the frequency after the PWM output is enabled otherwise the enable function will default back to the frequency set in the component properties.
Hopefully should work for you now. Note you need to set the frequency after the PWM output is enabled otherwise the enable function will default back to the frequency set in the component properties.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 217
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 35 times
- Been thanked: 26 times
Re: PWM FC component for ESP ?
ok
but when I check for update, the component new version is cal_pwm. and what is duty cycle range now for ESP32 ?
The modification you made are also for ESP32 Wroom ?
but when I check for update, the component new version is cal_pwm. and what is duty cycle range now for ESP32 ?
32 is very low!Set frequency do not work on FC PWM (internal) component.
Please also check duty cycle because I need to setdutycycle10bit to 32 to get 50% duty cycle .
What must be the max value for period overflow ?
The modification you made are also for ESP32 Wroom ?
Seb
-
- Matrix Staff
- Posts: 1952
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 510 times
- Been thanked: 698 times
Re: PWM FC component for ESP ?
Hello,
The PWM period property can be set up to 65535 on the ESP32, The duty can be between 0 (full off) and the period (full on).
The PWM period property can be set up to 65535 on the ESP32, The duty can be between 0 (full off) and the period (full on).
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 217
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 35 times
- Been thanked: 26 times
Re: PWM FC component for ESP ?
hello Ben,
I want to use 8 PWM output, the frequencies and dutycycle could be differents.
On the print screen below only 4 are setup for the moment.
Channel used are 1 to 4
On PWM component it's wrote that all PWM linked to the same timer will share same periode and prescaler . I have set all period overflow to 65535. ok for me
so the prescalers will be same
The problem is that when I change the frequency:
- on PWM:0 timer:0 pin:A, , the frequency also change on PWM:0 timer:0 pin:B
- on PWM:0 timer:1 pin:A, , the frequency also change on PWM:0 timer:1 pin:B
I want to use 8 PWM output, the frequencies and dutycycle could be differents.
On the print screen below only 4 are setup for the moment.
Channel used are 1 to 4
On PWM component it's wrote that all PWM linked to the same timer will share same periode and prescaler . I have set all period overflow to 65535. ok for me
so the prescalers will be same
The problem is that when I change the frequency:
- on PWM:0 timer:0 pin:A, , the frequency also change on PWM:0 timer:0 pin:B
- on PWM:0 timer:1 pin:A, , the frequency also change on PWM:0 timer:1 pin:B
Seb