Portenta_H7_PWM Library

Please use the new major release Portenta_H7_PWM Releases v2.0.0, with completely new code to fix PWM output issue you mentioned.


Releases v2.0.0

  1. Completely new code to fix no PWM output issue. Check No PWM-Output signals #1
  2. To permit start, stop, change and restore the settings of any PWM channel on-the-fly

Debug Terminal Output Samples

1. PWM_Multi on PORTENTA_H7_M7

The following is the sample terminal output when running example PWM_Multi on Portenta_H7 to demonstrate how to start multiple PWM channels, then stop, change, restore the PWM settings on-the-fly.

Starting PWM_Multi on PORTENTA_H7_M7
Portenta_H7_PWM v2.0.0
[PWM] Freq = 1000.00, 	DutyCycle % = 50.00, 	DutyCycle = 0.50, 	Pin = 0
[PWM] Freq = 2500.00, 	DutyCycle % = 50.00, 	DutyCycle = 0.50, 	Pin = 1
[PWM] Freq = 4000.00, 	DutyCycle % = 50.00, 	DutyCycle = 0.50, 	Pin = 3
[PWM] Freq = 5000.00, 	DutyCycle % = 50.00, 	DutyCycle = 0.50, 	Pin = 5
[PWM] Freq = 50000.00, 	DutyCycle % = 50.00, 	DutyCycle = 0.50, 	Pin = 6

==========================================================================================================
PW (us) 0	PW (us) 1	PW (us) 2	PW (us) 3	PW (us) 4	
==========================================================================================================
500.00		200.00		125.00		100.00		10.00		
Stop all PWM
0.00		0.00		0.00		0.00		0.00		
0.00		0.00		0.00		0.00		0.00		
Change all PWM
125.00		50.00		31.25		25.00		2.50		
125.00		50.00		31.25		25.00		2.50		
Restore all PWM
500.00		200.00		125.00		100.00		10.00		
500.00		200.00		125.00		100.00		10.00		
Stop all PWM
0.00		0.00		0.00		0.00		0.00		
0.00		0.00		0.00		0.00		0.00		
Change all PWM
125.00		50.00		31.25		25.00		2.50		
125.00		50.00		31.25		25.00		2.50		
Restore all PWM
500.00		200.00		125.00		100.00		10.00		
500.00		200.00		125.00		100.00		10.00