pwm_write, pwm_interface block unable to save file and unable to change peripheral setting
3 views (last 30 days)
Show older comments
Dear Community,
I am getting following error as per attached snap while using pwm_write and pwm_interface blocks.
- unable to save the file, unable to delete pwm_write block.
- unable to open hardware mapping and peripheral setting.
Appriciate your valuable feedback.
Thanks.
0 Comments
Accepted Answer
Aravind
on 13 Mar 2025
From your question and the screenshots you have shared, it seems you are attempting to generate a PWM signal from a hardware board but are encountering an error related to file saving.
Based on the screenshots, you have configured the "Hardware Implementation" in Simulink to use a TI Piccolo board, which is part of the "C2000 Microcontroller Blockset." However, the error message indicates that you are using the "PWM Write" block in Simulink to generate the PWM signal. According to the documentation at https://www.mathworks.com/help/soc/ref/pwmwrite.html, the "PWM Write" block is part of the "SoC Blockset" and is compatible only with hardware boards supported by the "SoC Blockset".
Since your hardware implementation is set up for the TI Piccolo board, part of the "C2000 Microcontroller Blockset," there is an incompatibility between what the "PWM Write" block requires and what the hardware implementation provides. This leads to the error and prevents displaying the Peripheral settings in the Hardware Mapping dialog box.
To resolve this issue, you can change the hardware implementation to a board supported by the "SoC Blockset." You can find the list of hardware supported by the "SoC Blockset" here: https://www.mathworks.com/help/soc/supported-hardware.html.
Alternatively, if your aim is to implement PWM on the TI Piccolo board, you can use the "ePWM" block designed for enabling PWM on C2000 boards. More information on this can be found here: https://www.mathworks.com/help/ti-c2000/control-peripherals.html.
I hope this answers your question. If you provide more specific information about your use case and setup, I can give you more targeted advice.
2 Comments
Aravind
on 14 Mar 2025
If your goal is to perform only a simulation, I suggest removing the hardware implementation and running it purely as a simulation.
To do this, navigate to the "Hardware Implementation" section in the model's "Configuration Parameters". Set the "Hardware Board" to "Determine by Code Generation system target file" and choose "grt.tlc" as the "Code Generation system target file". This will disable the hardware implementation and allow the model to run purely as a simulation. By doing so, you can use the "PWM Write" block and the "PWM Interface" block together without encountering the error you mentioned.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!