2017-10-25 11:07 PM
How I can solve
Failed to connect to the target problem occurred during connecting simulink to STM32F4 board in External Mode?
I follow all procedure mentioned on MAT-Target PDF provided by ST, but when I begin connecting my model to the target this error message occurred:
'Error occurred while executing External Mode MEX-file 'ext_comm': Failed to connect to the target. Possible reasons for the failure:
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. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
Caused by: Expected 1xN string array for host name'.
I checked the three possible errors mentioned above but no result.
Also I attached a snapshot for the error window appearing during connecting process.
So, could any one help me for solving this issue.
I used 2016a MatLab version with STM32F4 nucleo board.
#simulink #stm32-mat/target-matlabSolved! Go to Solution.
2018-01-19 06:16 AM
Thanks for your help,
Please mention where i have to change the heap value in code. please mention that part of code.
2018-01-19 07:09 AM
Thanks to all
Its working fine..
2018-01-21 04:31 AM
when you Build your code by the compiler, the program tells you where is the error. By the way the error occurs in assembly file ends with .S
2018-01-22 12:18 AM
Thank you,
I build the program but am not getting any error. getting only warnings. any way thanks for your support.
once again thanks to all.
2018-01-26 09:39 PM
Facing problem during connection with matlab externally
Am not able to read the ADC value externally in simulink scope any one please help me regarding this. Am able to connect successfully externally but am not able to monitor the ADC values in scope.
Am using STM32F407VG discovery board. Other than PWM and GPIO is working fine in external mode
Please any one help me regarding this. What configuration I have to do to read the ADC value in simulink.
Any configuration (CubeMX and Simulink block) or examples are there is more helpful,
Here i attached the simulink and cubeMx file
Thank you
2018-01-30 10:07 PM
Hello
Could you please attach the simulink and cubeMX file?
I will try to solve your problem.
Thanks.
Panuwat
2018-02-01 09:52 PM
sorry for the delay... I resolved but also have some other doubts regarding
the configuration of ADC in Cubemx.
1. Whatever the program I write it in Matlab after build into a Keil it
works fine in Keil software. But the result is not able to monitor in
Matlab.
2. Now I resolved this by enabling DMA in Cubemx. If we don't enable
this DMA we get only one conversion value in Matlan scope after it will not
show the conversion. But the conversion we can sea in Keil.
3. So, I have doubt on this configuration in Cubemx. Please help me
regarding this what configuration i have to do exactly in Cubemx
4. Last am not able to make out Single, continuous and discontinuous
conversion difference and how to set the delay in Matlab to read the ADC
value. now am not able to set a delay in this.
On Wed, Jan 31, 2018 at 1:01 PM, Aimagin Co., Ltd. <
________________ Attachments : ADC_PWM.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy4c&d=%2Fa%2F0X0000000b3f%2FMFUpURAf_QPoXLkBeoEbFbmfrrLyoOWUz47D2vFbdoE&asPdf=falseADC_PWM.slx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hxyu&d=%2Fa%2F0X0000000b3d%2F4I73PhdDI.4ffXm.X4EPe3Nn0RfnN3xBTH4DqJ0JRGM&asPdf=falseADC.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy4X&d=%2Fa%2F0X0000000b3b%2F7O9_yT8zN7JBPEHPm8VC9sIQBOGN6eeEs3vKB11ROqQ&asPdf=falseADC.slx.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hy2h&d=%2Fa%2F0X0000000b3Y%2FrGwYklEwBWSWtSuuinu2_Pr7.TNysd49uQ_OmXp.wvM&asPdf=false2018-02-09 03:17 AM
Hi, everyone
External mode require VCP(Virtual Com Port) in the configuration but the
http://www.st.com/en/evaluation-tools/stm32f4discovery.html
's virtual com port are not available. because ST-Link are not connected to the USART of the STM32F407.ST-Link of old reference doesn?t support VCP at all.
ST-Link of the new ref (
http://www.st.com/en/evaluation-tools/stm32f4discovery.html
) support VCP but is NOT connected to target.So, if you want to use it must do configuration as shown in below picture.
Source:
Best regards,
2018-02-13 11:03 PM
Thanks
2018-03-12 10:25 AM
Hi Xj Q
I use 2016b Matlab version with STM32F429ZI nucleo board.
I am tring to use External mode with simulink,
I followed
the example and the instructions decribed in 'the MAT/TARGET instruction (Hands On, Rev 2.2, Page 86-105). I follow all procedure mentioned on MAT-Target PDF, but when I begin connecting my model to the target this error message occurred (Picture below):'Error occurred while executing External Mode MEX-file 'ext_comm': Failed to connect to the target. Possible reasons for the failure:
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. If the Run button is not dimmed, click it. Otherwise, click the Build button, which downloads and runs your application on the target.
Any help for solving this issue please ? And how I can use USB Serial Port ?
Thanks