MATLAB cannot upload server code to the Arduino Due via the Native USB Port.
The Arduino Due has two USB ports:
- Native USB Port (labeled "Native USB"), is connected directly to the SAM3X MCU. This port supports CDC serial communication using the SerialUSB object.
- Programming Port (labeled "Programming"), is connected to an ATMEL 16U2 chip, which acts as a USB-to-Serial converter.
MATLAB only supports the Programming Port for uploading server code and board detection. The Programming Port appears in Windows Device Manager as "Arduino Due Programming Port (COMx)".
MATLAB uses USB-to-serial communication when interacting with TTL serial devices because USB is convenient and widely compatible with computers, while TTL serial is a low-level protocol used by many embedded systems. The USB-to-serial adapter (the 16U2 chip) translates USB protocol from the computer to TTL serial protocol used by the Arduino.
Please use the Programming Port and specify the correct COM port in your MATLAB command.
For reference, you may find the following resources helpful (although the first discusses the Arduino Uno, similar workarounds may apply):
Hope this helps, thanks!