出现的问题参考:https://www.ilovematlab.cn/thread-528134-1-1.html
Simulink Real Time 在2020b后已经采用 speedgoat了,更改内容请查阅官网。
主要问题:
A UART at adress 0x3e8 is not responding.
Simulink 官网说明(传统串口驱动):
Send/Receive 模块支持的串口主要有以下几种组合,
-
Com1/none
-
Com2/none
-
Com1/Com3
-
Com2/Com4
-
none/Com3
-
none/Com4
-
Custom
If you select either the Com1/Com3
or Com2/Com4
pair, check that the port pair shares an interrupt. If the port pair does not share an interrupt, you cannot use the two ports as a pair.
这个很重要!
默认设置对应于:
-
COM1 — 0x3F8, IRQ 4
-
COM2 — 0x2F8, IRQ 3
-
COM3 — 0x3E8 (if present), IRQ 4
-
COM4 — 0x2E8 (if present), IRQ 3
当0x3e8无响应的时候,说明你的COM3没有连接、没有这个设备等等,所以你最好检查一下你的串口COM3是不是正常。
Linux上:
# cat /dev/ttyS2 % 监听串口 COM3
==================ctrl + alt + t ====================
% 打开新的终端,以测试串口3是否正常
# echo string>/dev/ttyS2 % 把string这个字符串发送给COM3
注意你的系统权限,以及硬件连接。
Windows上就在设备管理器里面看COM3是否存在。
如果你像我一样穷,只有个电脑主板上的串口,那么:
双击send、receive,选Board Setup。然后自发自收。