I am constructing a custom board where we need to program/degub the DUE wirelessly over a serial to RF link. I know that the DUE uses the 16U2 processor to achieve an erase cycle of about 250ms after follows a wait for about 10ms and after that two 200ms resets followed after one and other with a 10ms space between. After this procedure 600ms later the programming is taking place. Fine so. But, since the 16U2 must get some kind of command from the Arduino environment to start the erase/reset circus and I wonder if it is possible to see somewhere which is the initial serial command sent out by the Arduino IDE to make this happen? As far as I understand the 16U2 is just a USB-serial device, using some more logic to erase/reset before programming code is transferred. But still it has to receive all the commands serially, is that correct understood?
I can construct my own ic to deal with the same reset serially, but i dont know which commands is sent to the 16U2 since this happens internally in the USB-environment.
I wonder which serial commands are sent to the 16U2 that initiate the erase/reset thing? I need to mimic this, since I really want to use Arduino IDE to program my device.
Any help here would be very appreciated!