So, for a bit of context, we have an underwater ROV project where we have a main communication link using UART (over differential pair). Programming is awkward is you need to remove the ROV from the water and pop the tube which risks getting the electronics wet. Running any extra wires is a no-go due to waterproofing and size constraints so we need a way of just using UART.
Adding an extra uC is something we could easily do as it is a custom designed PCB (still in design stage). We had the idea that this uC would also listen to the UART for the normal commands Arduino sends over serial before programming begins and triggers the reset (and the erase if we use the Due) but weren't sure how feasible this would be
So in short, can you program the Arduino Due/Mega over UART without a reset/erase line
You have to find a bootloader or some other piece of software that reacts on a specific "program" command from USART. Eventually it's sufficient to trigger the reset interrupt from such a special code.
So in short, can you program the Arduino Due/Mega over UART without a reset/erase line
If you want to change the function of your UART comms cable, make a change over circuit in the ROV and use a magnet and reed switch through the ROV wall to switch to Program mode.
I assume the UART comms cable is connected to other devices as well as the Arduino.
Just an idea.
Tom..
One possible solution is to connect an esp8266 running esp-link to Serial. To program the Mega, the ROV must be removed from the water because WiFi will not penetrate water. Use Serial1 for the tether to the surface.
Another solution is to use another processor to watch the Serial data stream for a start programming sequence from avrdude then reset the Mega. I am not how well this will work. esp-link does this so you could look at the source code to see what it looks for. This does not require removing the ROV from the water.
Joeorford:
Adding an extra uC is something we could easily do as it is a custom designed PCB (still in design stage).
You can reset an Arduino by cutting power and restoring it.
When burning bootloaders to AVR chips we can use an Arduino/AVR as a programmer. The chip to be loaded can get a program then. Possibly there is a way to do that that would work for you.
DrDiettrich:
You have to find a bootloader or some other piece of software that reacts on a specific "program" command from USART. Eventually it's sufficient to trigger the reset interrupt from such a special code.
That would mean you could send a code, say "PROGRAM" over the UART, and have the Arduino reset itself when that is received.