Bluescreen when using serial communication

조회 수: 12 (최근 30일)
Niklas Arold
Niklas Arold 2019년 8월 9일
댓글: Abhay Sengar 2021년 10월 12일
Hello
I do have a Problem with windows bluescreens when using serial communication on 2 different COM Ports
I am on Matlab R2019a and Windows 10.
I use a USB to 2xRS232 converter from FTDI for the serial communication ( FT2232H )
I use this code
function serialtest
f=instrfind;
if ~isempty(f)
fclose(f);
end
Terminator={'CR','CR/LF'};
SERIAL_MOTOR=serial('COM7','BaudRate',9600,'Terminator',Terminator);
SERIAL_MESSUNG=serial('COM6','BaudRate',9600,'Timeout',0.1);
Char_string='somestring';
fopen(SERIAL_MOTOR);
for i=1:1000
disp(i);
fprintf(SERIAL_MOTOR,"someotherstring");
SollV=fscanf(SERIAL_MOTOR,'%i');
if mod(i,100)==0
fopen(SERIAL_MESSUNG);
fprintf(SERIAL_MESSUNG,Char_string);
EmpfangenerString=fscanf(SERIAL_MESSUNG,'%c',10)
fclose(SERIAL_MESSUNG);
end
end
end
Sometimes the code triggers a Bluescreen on the fopen(SERIAL_MESSUNG).
But i can not reproduce it maybe 1 in 20 times of running this code the bluescreen occours. Does anybody have any clue wht could be the culprint of this error.
I already reinstalled Matlab, Windows 10 and all kind of drivers, including the newest driver from FTDI. I also had the Mainboard of my Notebook changed.
My only guess is, that the driver from FTDI is not very up to date, because it was last updatet 2017.
Any help is appriciated
  댓글 수: 2
Abhay Sengar
Abhay Sengar 2021년 10월 12일
Can you please share error messge/stop code and crash dump you are getting?
Abhay Sengar
Abhay Sengar 2021년 10월 12일
Also,Can you please tell which hardware are you using?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by