Use Packet Input Block Read Serial Port, Get Incorrect Result After Certain Time
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Use Packet Input block( serial port ) read sine waveform data(50Hz) from TI F28377S Launchpad
Baud rate: 12e6
Block Sample time = 0.0001;
Packet Input block gives incorrect value after Use 6.5795 seconds. Run simulation several time, problem occurs at the exact same time. Communication seems to be normal, because half of the result is correct. This looks like a software problem.
"Data Read Port" and "Data Error Port" show result should be right.(Data Read =>1, Data Error=>0)
Changing baud rate slower does not solve the problem.
Use longer Packet Input block sample time, larger frame size( use buffer block, unbuffer block, change "Packet Input" - "Block output data types" to '10*uint16' ), does not help either.
Otherwise, the speed of FTDI FT2232H chip is fast enough for this kind of transmission( uint16, 10k points/sec => only 160kbps ). Simulink Desktop Realtime should support 20kHz model samping rate by help document.
Attachment packet_input.zip include Simulink Data Imspector Session( Waveform )
Thanks for your help.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Target Computer Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!