cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-MAT/Target issue (really need help)

XLin.11
Associate II

Dear all,

I am new in here. I am learning the STM32-MAT/TARGET in PIL mode. I am following the STM32-MAT/TARGET Hands on Rev 2.4. When I run the Test_PIL_IIR_Filter.mdl and complete the parameter setting. I got errors as following:

The timeout of 5 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this failure.

You should:

(a) Check that the target hardware configuration is correct, for example, check that the byte ordering is correct.

(b) Confirm that the target is running.

(c) Consider the possibility of application run-time failures (e.g. divide by zero exceptions, incorrect custom code integration, etc.).

Note (c): To identify possible reasons for the run-time failure, consider using SIL, which supports signal handlers and debugging.

If you cannot find a solution, consider using the method setTimeoutRecvSecs of rtw.connectivity.RtIOStreamHostCommunicator to increase the timeout value.

My software version:

WIN10 (64 bit)

MATLAB 2018b (win 64) academic license

STM32CubeMX version 5.4.0

Atollic TrueSTUDIO version 9.3.0

Hardware:

STM32F407VG Discovery

I could not find a way to address it. Can anyone help me to solve it? Thank you very much.

Kind regards

1 REPLY 1
Cyril FENARD
ST Employee

Hi @XLin.1​ ,

The IIR_Filter_int32_PIL simulation was validated on several STM32 devices.

The problem you face with PIL is mostly due to COM - USART communication.

First of all, verify that the USART you have selected during the PIL is correct.

With the execution of debugger, stop the device, normally there is polling on RX of the USART link, meaning waiting for host PC data.

A thing that can help, is to see if there is an example in the installation files for the STM32-MAT/TARGET tool that exhibits your board with USART.

Regards

Cyril

PS:

$ cat ./STM32/STM32demos/PIL/Filter/Readme.txt

The IIR_Filter_int32_PIL (Model Block PIL with shared configuration) PIL simulation has run with the following configurations:

 - F429ZITx @ 180 Mhz, USART1: 673 µs (arm-none-eabi-gcc) ( 518 µs with O2)

 - F401RETx @ 84 Mhz, USART2: 861 µs (IAR arm)

 - L476RG  @ 80 Mhz, USART2: 1241 µs (IAR arm)

 - L476RG  @ 80 Mhz, USART2: 2116 µs (arm-none-eabi-gcc) (1728 µs with O2)

 - G431RBTx @ 170 Mhz, USART2: 909 µs (IAR arm)

 - G431RBTx @ 170 Mhz, USART2: 1167 µs (arm-none-eabi-gcc) ( 978 µs with O2)

 - F302R8Tx @ 64 Mhz, USART2: 1907 µs (IAR arm)

 - F302R8Tx @ 64 Mhz, USART2: 1893 µs (arm-none-eabi-gcc) (1558 µs with O2)

 - G474RE  @ 170 Mhz, USART2: 938 µs (IAR arm)

There are known issues with project generated for SW4STM32:

- Includes may not be correctly formatted in build settings of IIR_Filter_int32 eclipse project.

 for instance

  replace "../../"../../../../../Program Files/MATLAB/R2018b/extern/include""

       by "../../../../../../../Program Files/MATLAB/R2018b/extern/include"

The Simulink model in details.

- Test_PIL_IIR_Filter.mdl                  The top model where from the RUN is started.

- IIR_Filter_int32.mdl                     The model in Normal simulation mode.

- IIR_Filter_int32.mdl                     The model in PIL simulation mode.

- iir_startup.m                            Script run in pre-load of the Test_PIL_IIR_Filter model.

- testdata.txt                             Data computed and loaded in workspace as input for the simulation.

                                           1000 noisy sine wave values for 1 second of simulation.

- Test_PIL_IIR_Filter_config_ref.mat       Configuration as reference shared with other models.

                                           (stm32.tlc for the System target file)

- C:\MATLAB\STM32-MAT                      The current directory in the MATLAB session.

- C:\MATLAB\STM32-MAT\IIR_Filter_int32_PIL The directory that contains

                                           the IIR_Filter_int32.ioc and customized files for STM32cubeMX tool.

                                           These files are generated during the Simulink RUN process.