I've found out that the period input is in seconds, and the compare input is ranged between 0 and 1. When using CMPA and CMPB and a PWM generator in up-count mode, the compare input can be a bus (first element is the CMPA value and the second element is the CMPB value).
SoC blockset pwm write period adjustment
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Guido de Hek
am 1 Mär. 2022
Beantwortet: Guido de Hek
am 19 Jan. 2023
Hi all,
Using SoC blockset, I am trying to generate PWM pulses using a C2000 target (F28388D). Both in simulation and on the target, I am able to produce PWM pulses. For my application I want to adjust the switching frequency while the system is running. I am trying to achieve this using the period input in the PWM write block, but regardless of what I try, the switching period remains unchanged. Also, in the documentation, a unit for the period input is not specified.
Does anyone have suggestions on how to proceed? Which unit to use for the period input?
Thanks in advance for your input.
Guido de Hek
Attachment: PWM peripheral settings:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/910665/image.png)
System model:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/910670/image.png)
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu System on Chip (SoC) finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!