4 years, 8 months ago.

serial communication with simulink

I am trying to communicate with mbed lpc1768 and simulink. I use Serial block of "instrument control toolbox", i receive data from mbed but i have error when i try to send data :

An error occurred while running the simulation and the simulation was terminated Caused by: Error evaluating registered method 'Outputs' of MATLAB S-Function 'sserialsb' in 'untitled/Serial Send'. Unsuccessful write: An error occurred during writing.

I try with an USB to Serial cable by making the Rx connected to Tx and it work.

Can anyone help me?

I was able to make it work using the fprintf in a matlab script.

1 Answer

4 years, 8 months ago.

Hi Mohand,

First you can use serial tool on PC like Teraterm or Coolterm to check if the serial communication is good. Then you can check if the UART configuration on both side are the same, like baudrate, parity/stop bit, and hardware flow control.

Thanks, Desmond