AnsweredAssumed Answered

STM32_MAT_Target External mode error

Question asked by Reza Hosseinzadeh on Jul 26, 2017
Latest reply on Nov 15, 2017 by XJ Q


I am trying to use the Simulink external mode according to the hands on for stm_32_mat_target.

During the process I got two errors when I click build in Simulink and after selecting serial port and usart pins, there is an error as :

The IPs still have some not configured or wrong parameter values: [USART2]

Do you still want to generate code?

I tried with USART2 without configuring USART in cube mx and also with USART1 and 3 to use a USB to UART bridge and then configured the USART connection in cube mx but still getting the same error before generating the code.

And if I continue generating the code when I try connecting to the target in Simulink I m getting the following error:

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 am using Matlab2016b,

I tried with cube_mx 4.21.0 and 4.22.0

Using both Keil u5.23 and IAR embedded workbench