Could not connect to STM32F7xx board for serial communication
25 次查看(过去 30 天)
显示 更早的评论
Hello,
I followed the steps mentioned below on how to work on the STM32 processor based boards:
- https://www.mathworks.com/videos/using-simulink-with-stm32-discovery-and-stm32f4xx-based-boards-1637578171735.html
- https://www.mathworks.com/help/supportpkg/stmicroelectronicsstm32f4discovery/ug/Getting-started-stm32cubemx.html
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.
回答(1 个)
Sameer Pujari
2022-10-25
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”
- In CubeMX, Ensure that you are using USART1 in “Asynchronous mode” and set Baud rate to 115200 Bits/s
- In Configuration parameters > Hardware Implementation > Connectivity, Specific USART1 and COM port used by the device
For detailed explanation you can refer to Monitoring and Tuning Using STMicroelectronics STM32 Processor Based Boards - MATLAB & Simulink - MathWorks India
I hope this information helps you!
4 个评论
WUG
2022-12-5
编辑:WUG
2022-12-5
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!