This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Serial comunication F28035-Matlab

Hi,

I need to set and get variables of a F28035 (mounted on an HV_SOLAR_DC_DC), while it is running.

I'm trying to initialize a serial communication in matlab (USB connection, JTAG disabled).

s = serial('COM20','BaudRate',4800,'DataBits',8,'Parity','none','StopBits',1,'Timeout',180)
fopen(s);        display('Open');
fprintf(s,'a');   display('send data');
display('wait for echo');
pause(1);
fscanf(s)
fclose(s);
delete(s);
clear s;

But when I write some data, I can't read them back echoed: at the timeout a get an  ' ÿ '.

Is there any demo script where the communication is initialized correctly?

Thank  you.

Stefano.