pwm_write, pwm_interface block unable to save file and unable to change peripheral setting

3 views (last 30 days)
Dear Community,
I am getting following error as per attached snap while using pwm_write and pwm_interface blocks.
  1. unable to save the file, unable to delete pwm_write block.
  2. unable to open hardware mapping and peripheral setting.
Appriciate your valuable feedback.
Thanks.

Accepted Answer

Aravind
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
Bhagyesh
Bhagyesh on 13 Mar 2025
@Aravind: Thanks for your reply. I understood pwm_write block is supported by SoC Blockset. but PWM_Interface block is part of C2000 Microcontroller Blockset. That I wants to use for simulation of PWM waveforms, ON_OFF time PWM, etc. As PWM_Interface block requires input of "msg" which from pwm_write block (SoC Blockset). How do I use it to simulate.
Thanks.
Aravind
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.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!