Getting an error while trying to connect custom Board based STM32L4 Series Chipset

29 views (last 30 days)
Hi, I just want to build model for my custom board stm32l431rct6 via stm32f303vct6 discovery board, So Iniatially I faced lot of struggles, so I ve decided to build a model for only Disco board, I can able to build, deploy and run the model and also can able to do monitor and run the model via vcp protocol( this is the main concern which I am facing rn ). I can do this in disco board....In custom as far as in STM32L4 Series Uart2 is the standard one for the vcp protocol so tapped the wire directly from it which is connected to JP4 pins in STLINK Disco board for the protocol...so Iniatially I can able to build, deploy and run the basic model in custom board but I cant able to do the same thing in Monitor and run mode and Im getting the this error.

Answers (2)

Leepakshi
Leepakshi on 19 Nov 2025 at 5:15
Hi Karthika,
The error you are seeing in External Mode (OPEN_PROTOCOL Connect command failed) typically occurs when the model running on the target does not match the host model due to checksum mismatch. This can happen if:
  1. The model is set to 'Accelerator' mode in the SIMULATION tab at the time of build. Try changing the simulation mode back to 'Normal' before you attempt to run the simulation in external mode on your target.
  2. Model was rebuilt but not redeployed on the target.
  3. External mode configuration (communication interface, baud rate, etc.) differs between host and target.
Hope it helps!

Shivam
Shivam on 25 Nov 2025 at 3:36
Edited: Shivam on 25 Nov 2025 at 4:28
Hello @karthika,
Could you please provide the connection details? Specifically, I’d appreciate it if you could share how the two boards are connected—namely, which pins on one board are connected to which pins on the other board. This will be essential in debugging the connections.
From the inputs provided by you it seems that you are trying to flash the L4 board with the st-link of stm32f303vct6 discovery board.
In the mean while, you can try the following workarounds to see whether this solves the problem or not.
1) Check the COM port.
Open the device manager and note down the com-port number corresponding to the st-link of stm32f303vct6 discovery board. Ensure that you select the same COM port in the "Hardware settings" as shown below.
2) Rebuild the model and deploy on the target.
If you have made any changes in the model, try to rebuild it and deploy on hardware (press "Monitor and tune"). After the model is deployed on hardware, click on "Connect" as shown below. You should be able to see the message confirming the connection in the diagnostic viewer.
3) Change the Baud-rate from the IOC file:
Try to reduce the baud rate in the IOC file and repeate the above steps.
If the above steps still does not work, kindly contact the Technical Support for further assistance:
We will require more information to look into the issue.
Please make sure to attach the relevant files pertaining to the project like simplified/reduced Simulink model and the IOC file. It will be helpful in reproducing the issue faced by you.
Thanks!

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!