would you mind connecting a 4k7 resistor from one of the non-PWM digital pins to +5V on your arduino board, then repeating the experiment you outlined (including asserting then releasing DTR)? remember: the lockup condition only occurs when there is a pullup present on one of the non-PWM digital pins.
it is also possible, since your Seeeduino Mega does not use a 328p (it uses the 1280), that no lockup will occur. so far we've only been testing with boards that use the 328p, and other atmel processors may behave differently.
Very interesting observations to report. First I changed to my 'official' Arduino 2009 328 based board that uses the FTDI USB converter (just like my Seeeduino mega board) but unlike the Uno's 8u2 converter chip.
Adding no pull-up resistor, the 2009 board works exactly the same as the Seeeduino mega board as far as being able to reset the board by either turning the DTR signal on or off, and not being able to cause any kind of lock-up (but still not trying to power cycle the board).
Then I added a 4.7k pull-up to pin 12 and tried testing DTR again, same behaviors as before.
Moved the pull-up to:
Pin 2, same behavior as pin 12 or with no pull-up.
Pin 4, different behavior, I can cause a reset turning on DTR but then turning off DTR does not cause a
board reset?
Pin 7, same as pin 4, not able to cause a reset turning off DTR only turning it on cause board reset.
Pin 8, same as Pins 12 and 2, was able to reset both turning on and off DTR
Interesting no? Showing some auto-reset differences if using a 4.7k pull-up but only on none-pwm pins 4 & 7. The schematic for the 2009 board shows no pull-down resistor used on the FTDI DTR signal output pin.
I'm not sure what any of this means. I wouldn't have expected to see a change in behavior based on what non-pwm pins have a external pull-up resistor or not? As what I'm seeing has nothing to do with using a 8u2 converter chip, (with a pull-down resistor or not) and not using the Uno's bootloader code, I'm not sure if what I have has anything to do with what you are dealing with?
So I tried a simple power cycling test with just one of the 'strange' pins, pin 4 using the 4.7k pull-up resistor. I closed my terminal program and unplugged my arduino from the USB. I then plugged in the 2009 board and then opened up brey terminal selected the proper comm port 5 and guess what, no Restart message and no loop back function! the board appears to be locked up. Normally opening the brey terminal session on the correct port causes any attached arduino board to reset, but not in this case with a external pull-up resistor on pin 4? If I then turn on DTR I get a board restart message and loop backs work. Also if starting in this 'lock-up' mode, if I press the boards reset switch I get a Restart message and loop-backs work and then it's back to where I can reset the board by turning on DTR but not cause a reset when turning DTR off.
So what does it all mean? All I can state is that it appears that the Arduino auto-reset function is not a great robust design and can be effected by having external pull-up resistors wired to certain pins and that the 'strange' behavior(s) can be seen on power-up or by not resetting the board by turning off DTR. This second symptom is probably not something anyone would notice using the arduino IDE as I'm pretty sure it uses a complete DTR on, delay, DTR off to reset a board, never using a DTR on to off transition to try and reset the board. So I'm pretty sure it's all just a hardware bug being effected by the use of the auto-reset circuit as I can't think of any common software component we share in the testing I just did.
Your thoughts?
PS edit: By the way I highly recommend the Brey terminal program for any Windows users out there. It's a free standalone exe program that needs no installtion steps (I carry a copy around in a memory stick) and has tons of features useful for testing serial devices including arduino boards. Terminal
Lefty