by Olav Kahlbaum (TRINAMIC) » 12 Sep 2006, 10:39
The format of the .bin file is quite simple. It just contains the binary commands, but without the address byte. So every command in the file consists of eight bytes: command byte, type, motor, 4 byte value, checksum.
To download it to the module, just do the following:
Send the "enter download mode" command (command 132, type=0, bank=0, value=start address (normally 0)).
For every command in the file:
Read 8 bytes from the file. Send the address byte of the module, and add the address byte to the checksum byte (the 8th byte of the record from the file). Then send these 8 bytes.
The module will send a reply where the status code is set to 101 (this means "command stored").
After the last command has been sent, send the "exit download mode" command (command 133, all parameters set to 0).
This is the download procedure.