Problems with connection to stm

I have got a problem with my stm32f4 discovery, it doesn't run on external mode, I use the sample code stm32f4discovery to try to connect it. I changed nothing, did build the code, I am using the com28 with a baudrate of 9600, I think is the default value. Sometimes it doesn't connect and sometimes it does.
The error code when I can't connect is:
Error occurred while executing External Mode MEX-file 'ext_serial_win32_comm':
Failed to connect to the target. A time-out occurred while waiting for the first connect response packet. Possible reasons for the time-out:
a) The target is not switched on.
b) The target is not connected to your host machine.
c) The application for the model is not running on the target. You might have clicked the Stop button.
d) restart matlab
So I restarted matlab and it connected (I think).
So I wanted to build and run the simulation, but it still seems not to work!
The next error code I received is:
The model that you are trying to run in External mode does not match the application running on your target. Rebuild the model, run it on your target, and start External mode simulation again.
So I did rebuild the model several times, even tried to program the stm with ST-Link and then tried to simulate again.
Can anyone tell me what i'm doing wrong?

댓글 수: 5

Eugene Tanchik
Eugene Tanchik 2015년 2월 11일
I have the same problem.
Jan
Jan 2015년 2월 11일
Then, Eugene, provide more information. As you can see, the original message did not get an answer.
Eugene Tanchik
Eugene Tanchik 2015년 2월 13일
편집: Walter Roberson 2015년 6월 15일
I use tutorial example from Code Verification and Validation with External Mode on MATLAB R2014a.
Build process completed successfully.
COM5, baud rate 128000.
My MEX-file arguments: 1 5 128000
I have the following message:
Error occurred while executing External Mode MEX-file 'ext_serial_win32_comm':
Failed to connect to the target. A time-out occurred while waiting for the first connect response packet. Possible reasons for the time-out:
a) The target is not switched on.
b) The target is not connected to your host machine.
c) The application for the model is not running on the target. You might have clicked the Stop button.
Preetham Fernandes Joel
Preetham Fernandes Joel 2015년 6월 15일
Wesley, Eugene Did you get solution to this problem? If yes, please help me to fix same problem.
Thanks in advance
Regards, Lokesh Bhatt
Abdelghafour SID
Abdelghafour SID 2017년 3월 11일
i have the same problem did you found the solution

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2014년 12월 1일

댓글:

2017년 3월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by