Could not connect to STM32F7xx board for serial communication

17 visualizaciones (últimos 30 días)
Omar Ismail
Omar Ismail el 16 de Oct. de 2022
Editada: WUG el 5 de Dic. de 2022
Hello,
I followed the steps mentioned below on how to work on the STM32 processor based boards:
I was able to "Build, Deploy & Start" the simulink model without any errors.
However, once I try to run in the "Monitor & Tune" mode I get the error:
  • "External Mode Open Protocol Connect command failed. Caused by: Could not connect to target application: XCP serial port error: open: The parameter is incorrect".
Moreover, when I try the "Connect" mode after the "Build, Deploy & Start" I get the error:
  • "External Mode Open Protocol Connect command failed. Caused by: DWARF Parser internal error: Parser::describeSymbol xcpDummyDoubleVariable is not a global variable"
My board is recognized as Virtual COM Port and in the Configuration parameters -> Hardware Implementation -> Connectivity I set the Serial Port to the Virtual COM Port that the board is set on.
The implementation from the STM32CubeMX:
I used STM32CubeMX and STM32CubeIDE to test the serial connection and it was working fine.
The only difference between both solution is that Simulink asks for USART and I used USART1 for this. Also, the driver selector should be LL for the solution to be used in Simulink. However, with the STM32CubeIDE it is HAL.
I'm not sure what is the cause of the problem. I hope someone knows a solution to this error.
Thanks.

Respuestas (1)

Sameer Pujari
Sameer Pujari el 25 de Oct. de 2022
Hi Omar Ismail
I understand you are facing communication issue while using “Monitor and Tune” mode on STM32F7xx board
Ensuring following settings should enable you the configuration for “Monitor and Tune”
  1. In CubeMX, Ensure that you are using USART1 in “Asynchronous mode” and set Baud rate to 115200 Bits/s
  2. In Configuration parameters > Hardware Implementation > Connectivity, Specific USART1 and COM port used by the device
I hope this information helps you!
  4 comentarios
Omar Ismail
Omar Ismail el 5 de Dic. de 2022
Hello, all I did was just to upgrade to Matlab R2022b and after that I installed the libraries again. Then, I used TTL to USB conveter and changed the UART that I was using. This solved the problem.
I hope this could help.
WUG
WUG el 5 de Dic. de 2022
Editada: WUG el 5 de Dic. de 2022
Dear Omar Ismail
Thank you for your hearty answers.
May you teach me what kind of USB-TTL converter you had used and your configuration about USART, such about baud rate and so on?
Maybe I had do some wrong configuration between PC and STM32.
I am looking forward to your answers.

Iniciar sesión para comentar.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by