Clear Filters
Clear Filters

Nucleo support package PIL simulation example

1 view (last 30 days)
Hi, I'm trying the "Code Verification and Validation with Processor-in-the-loop (PIL) Simulation" example and on the "Verification Referenced Model Code with PIL" section. When I run the simulation, Simulink try to open the default port COM2 insted of the port COM26 as I specified in the configuration parameters window.
I'm using MATLAB R2021b with the latest "Simulink Coder Support Package for STMicroelectronics Nucleo Boards"
Is there a way to change the default setting of this example ?
Best Regards,
Bruno

Answers (1)

Asim
Asim on 29 Jan 2024
Hello Bruno,
To set the COM port to COM26 for a Processor-in-the-Loop (PIL) simulation with the STMicroelectronics Nucleo board support package, please follow these steps:
  1. Open the Simulink model and access the Configuration Parameters by selecting "Simulation" > "Model Configuration Parameters" or pressing Ctrl+E.
  2. In the Configuration Parameters window, go to "Hardware Implementation" > "Target hardware resources" > "External mode" and set the "Serial port" to COM26.
  3. If your model includes a PIL configuration block, double-click it to ensure the COM port is set to COM26 there as well.
  4. During the Hardware Setup process for the Nucleo board via "Add-Ons" > "Manage Add-Ons", confirm that COM26 is selected as the COM port.
  5. After making these changes, rebuild and redeploy the PIL application to the board.
If the COM port is still defaulting to COM2, you may need to check if there are any scripts or .tlc files that are part of the code generation process which could be overriding the setting.
I hope it helps.
Best Regards,
Asim Asrar

Products


Release

R2010b

Community Treasure Hunt

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

Start Hunting!