PWM NOT WORKING
Moderator: Benj
PWM NOT WORKING
Hi everyone
I'm trying to use the pwm without success.
The output pin always remains low as if it was not enabled.
I'm using the example available here https://www.matrixtsl.com/wiki/index.ph ... 9ba088505c
I'm using a pic32mx470f512h
Greetings
Update
The pwm only works on chanel 1. If I try to change the channel always keeping the timer 2 the pwm stops working.
I'm trying to use the pwm without success.
The output pin always remains low as if it was not enabled.
I'm using the example available here https://www.matrixtsl.com/wiki/index.ph ... 9ba088505c
I'm using a pic32mx470f512h
Greetings
Update
The pwm only works on chanel 1. If I try to change the channel always keeping the timer 2 the pwm stops working.
- Attachments
-
- PWM_fader.fcfx
- (8.84 KiB) Downloaded 259 times
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: PWM NOT WORKING
Hi.
First off all you have to make sure your configuration settings are correct
(1) mcu is running
(2) running at the correct speed
Secondly as the PIC32 PWM makes amatch between the Duty set value and the value the Timer PR register is loaded with I would use the
setDuty10 parameter ,I have done this in your Flowchart and you will see the PWM in the simulation is active
Hope this helps check your configbits they look abit strange to me
First off all you have to make sure your configuration settings are correct
(1) mcu is running
(2) running at the correct speed
Secondly as the PIC32 PWM makes amatch between the Duty set value and the value the Timer PR register is loaded with I would use the
setDuty10 parameter ,I have done this in your Flowchart and you will see the PWM in the simulation is active
Hope this helps check your configbits they look abit strange to me
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: PWM NOT WORKING
Hi
I just compiled the Fowchart and programmed a uC32 board with your Flowchart
and the PWM is working just fine using the setDuty10 function
Counting up and down
I just compiled the Fowchart and programmed a uC32 board with your Flowchart
and the PWM is working just fine using the setDuty10 function

Counting up and down
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
Re: PWM NOT WORKING
Hi Qmesar
Thanks for the reply.
Yes, checking the configuration of this project is totally wrong.
the settings that I usually use are as follows.
The program now works correctly but only on channel 1.
If I try to change channels, the pwm will not work
Thanks for the reply.
Yes, checking the configuration of this project is totally wrong.
the settings that I usually use are as follows.
The program now works correctly but only on channel 1.
If I try to change channels, the pwm will not work
- Attachments
-
- pwm_configuration.jpg (102.78 KiB) Viewed 6197 times
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: PWM NOT WORKING
Hi.
Ok I will try on my uC32 board and see what I get sometime today .
Ok I will try on my uC32 board and see what I get sometime today .

https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: PWM NOT WORKING
Hi
With me Channel 1 and 2 are working
Did you use a second PWM enable icon and enable PWM2 ?
With me Channel 1 and 2 are working

Did you use a second PWM enable icon and enable PWM2 ?
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
Re: PWM NOT WORKING
Hello Qmesar
I'm sorry for the delay, but I had to finish a project.
Today I tried again to run the software but I still have problems with the channel other than 1.
The pwm works correctly on channel 1.
In the next days I continue to investigate because it is very strange.
I'm sorry for the delay, but I had to finish a project.
Today I tried again to run the software but I still have problems with the channel other than 1.
The pwm works correctly on channel 1.
In the next days I continue to investigate because it is very strange.
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: PWM NOT WORKING
Hi ,
OK no problem at all please report your findings as I am not using the exact same chip as you .
I would have liked to test on the same chip but I do not have one .
Good luck

OK no problem at all please report your findings as I am not using the exact same chip as you .
I would have liked to test on the same chip but I do not have one .
Good luck
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PWM NOT WORKING
Hello Alkaline,
Did you manage to get anywhere with this?
Did you manage to get anywhere with this?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: PWM NOT WORKING
Hi Benj
sorry for the wait but I had to spend some time on other projects.
Anyway the pwm works correctly!At the beginning I had a little bit of difficulty in understanding how the flowocode set the various parameters but then I solved it!
On another subject, the program i'm completing is very large, how can I know exactly how much space it holds in memory? Do I need to enter any commands in the compiler?
now to calculate the program memory I convert the reported value
"program memory: start address = 0x1d000000, end address = 0x1d0407ff"
d0407ff = 264,191 bytes, is it right?
Thanks in advance
sorry for the wait but I had to spend some time on other projects.
Anyway the pwm works correctly!At the beginning I had a little bit of difficulty in understanding how the flowocode set the various parameters but then I solved it!
On another subject, the program i'm completing is very large, how can I know exactly how much space it holds in memory? Do I need to enter any commands in the compiler?
now to calculate the program memory I convert the reported value
"program memory: start address = 0x1d000000, end address = 0x1d0407ff"
d0407ff = 264,191 bytes, is it right?
Thanks in advance
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: PWM NOT WORKING
Hello,
Looks right to me."program memory: start address = 0x1d000000, end address = 0x1d0407ff"
407ff = 264,191 bytes, is it right?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel