cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout error trying to connect via ''external mode''

candidocudeiro
Associate II
Posted on April 01, 2015 at 19:10

Hi, I posted a question yesterday which was solved by myself about the external mode connection. But now I am getting another problem, a timeout error.

I am using the ''Embedded Coder Support Package for STMicroelectronics STM32F4-Discovery'' and I try to run the tutorial ''Code Verification and Validation with PIL and External Mode'' (task 4).

The error I get when I click the Start button at the last step is:

''

Error occurred while executing External Mode MEX-file 'ext_serial_win32_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. Caused by: ExtOpenSerialConnection() returned an error. More details may be reported in the MATLAB command window.

''

It seems to be a problem with the physical connection or the configuration.

I think that the problem is that I do not know how to configure de USART module. I only can configure verbosity, com port and baudrate.

I supposse I need to adjust the same parameters in the device administrator settings for the COM PORT such as baudrate, parity, stop bits... but I can't find theese options in simulink for the stm32f4. Also, I should be able to choose wich module I want to use, right? But I can't find the way to do that with the blockset I mentioned.

I followed all the steps in this tutorial but it does not work.

I think there is some configuration missing.

The next I would do it would be to try with the STM blockset or the waijung blockset, which have more blocks and I may be able to get this to work.

I would appreciate any help.

Regards
1 REPLY 1
candidocudeiro
Associate II
Posted on April 29, 2015 at 00:47

Just to clarify, in case anybody else has had the same problem:

In my case it was just that I was provided a USB 232 adapter but I didn't make sure it was TTL compatible. It was not. mistery solved.

Regards.

P.S: by the way, there is no need to configure the transmission settings via the device administrator window. Theese transmission parameters (nº of bits, parity, etc) are automaticaly configured.