These commands may be sent over the serial line. The preceding semicolon ';' defines, that the command is targeted onto the small USB-serial chip.
- ;C2560_RES - RESET the 2560 uC
- ;C32u2_RMD - Set operation to Non reset mode
- ;C32u2_RME - Set operation to reset mode
- ;C32u2_SNR - Read serial number
- ;C32u2_SNW:<SN> - Store serial number. The colon symbol is important
- ;C32u2_SHI - Set the serial to a high value (typically 1Mbaud)
- ;C32u2_SLO - Set the serial to a low, default value (typically 115200baud)
- ;C32u2_FWV - get the version of this firmware
Details see: https://github.com/prusa3d/32u2-usbserial/blob/master/Arduino-usbserial.c
Important note about newlines:
The commands themselves don't require a '\n' to be executed, however, the actual text of the command is sent to the atmega2560 as well which treats the command as a GCODE. Because the command starts with a semicolon, the contents of the command are ignored, but in order to cancel out the GCODE commenting (semicolon), a '\n' or a '\r' must be sent after the command in order to terminate the GCODE line.
Example responses (all have '\n' at the end):
TX> ;C2560_RES
RX> Reset 2560 triggered
TX> ;C32u2_RMD
RX> Reset mode deactivated
TX> ;C32u2_RME
RX> Reset mode activated
TX> ;C32u2_SNR
RX> S/N is:<19 \x7F characters. There is a '\n' at the end. This is the response when no SN is programmed>
TX> ;C32u2_SNW:CZPX3417X003XK32824
RX> S/N burned:CZPX3417X003XK32824
TX> ;C32u2_SNR
RX> S/N is:CZPX3417X003XK32824
TX> ;C32u2_SNW:CZPX3417X003XK32824
RX> S/N burn FAILED!<If there is already a SN programmed, the SNW command fails>
TX> ;C32u2_SHI
RX> Setting serial to high mode!
TX> ;C32u2_SLO
RX> Setting serial to low mode!
TX> ;C32u2_FWV
RX> 1.3
TX> ;ABCDEFXXX
RX> Command not found!
The 32u2 also responds to commands that originate from the UART port:
Example responses (no '\n' at the end):
UART_TX> ;S
UART_RX> CZPX3417X003XK32824