“In the latest "experimental" 0.9 Teensyduino code, I have switched Windows and Linux support to use 134 baud setting instead of the break signal, and the reset-on-break behavior has been removed.
This should allow Teensy to work with Winbatch, or any other programs that unexpectedly sends the break signal. Just don't set the baud rate to 134. On Teensy, the data transfer is always native 12 Mbit/sec with native flow control, no matter what the baud rate setting in software.” (quote from Paul online...)
Hi All,
I have a large need of being able to do a normal reset (“The normal reset causes your program (at location zero) to run.”) of a Teensy 2.0++ from a C# program running on a Windows 7 PC. With original style Arduino’s I could toggle DTR under PC software control to force a reset and then wait til the bootloader had adequate time to quit and begin executing my Arduino program.
My goal is to generate a software routine on the host PC side (talking to a Teensyduino program on Teensy 2.0++) to force a restart of the Teensyduino program. For instance, if some event locks up the Teensyduino code, I want the host to be able to force it to restart. Or if the host needs to force the Teensy into a known state. (Again, like the DTR toggle trick on a regular Arduino.)
I used the 134 baud setting switch and am able to get the Teensy 2.0++ to switch from being a serial port to a USB HID device (I can see it occur in Device Manager in Windows 7). I am doing this using Visual Studio C#.NET Express. Now the problem comes in when I am trying to turn HalfKay off and reboot my Teensyduino program. (http://www.pjrc.com/teensy/halfkay_protocol.html)
In Windows land I am using LIBUSBDOTNET ( http://sourceforge.net/projects/libusbdotnet/) to try to communicate with the HID and generate a usb_control_msg to reboot from HalfKay, via your pjrc.com documentation. I am able to open the HID but only after creating a fake libusb-win32 filter driver (http://sourceforge.net/apps/phpbb/libusbdotnet/viewtopic.php?f=3&t=46)... I still have not been able to get HalfKay to respond to the control transfer I am trying to send and my guess is that it is due to the fake filter driver...
So, two thoughts:
Could someone create another baud setting switch that allows the teensyduino program to be restarted? (I am not sure how to approach this... any suggestions would be awesome.) So my C# program sets the baud rate to, say, 135, waits a few hundred milliseconds and then can expect (or check) that the Teensyduino program to be restarted... This would be a major help for me and I think other users.
The other thought: Does anyone have a piece of code running under Windows, Visual Studio would be great, that shows how to use the 134 baud rate switch, then do the HalfKay reset to the user program?
This has been a major time sucker for me in the last week with no forward progress. Any help or suggestions would be appreciated.
Bill
This should allow Teensy to work with Winbatch, or any other programs that unexpectedly sends the break signal. Just don't set the baud rate to 134. On Teensy, the data transfer is always native 12 Mbit/sec with native flow control, no matter what the baud rate setting in software.” (quote from Paul online...)
Hi All,
I have a large need of being able to do a normal reset (“The normal reset causes your program (at location zero) to run.”) of a Teensy 2.0++ from a C# program running on a Windows 7 PC. With original style Arduino’s I could toggle DTR under PC software control to force a reset and then wait til the bootloader had adequate time to quit and begin executing my Arduino program.
My goal is to generate a software routine on the host PC side (talking to a Teensyduino program on Teensy 2.0++) to force a restart of the Teensyduino program. For instance, if some event locks up the Teensyduino code, I want the host to be able to force it to restart. Or if the host needs to force the Teensy into a known state. (Again, like the DTR toggle trick on a regular Arduino.)
I used the 134 baud setting switch and am able to get the Teensy 2.0++ to switch from being a serial port to a USB HID device (I can see it occur in Device Manager in Windows 7). I am doing this using Visual Studio C#.NET Express. Now the problem comes in when I am trying to turn HalfKay off and reboot my Teensyduino program. (http://www.pjrc.com/teensy/halfkay_protocol.html)
In Windows land I am using LIBUSBDOTNET ( http://sourceforge.net/projects/libusbdotnet/) to try to communicate with the HID and generate a usb_control_msg to reboot from HalfKay, via your pjrc.com documentation. I am able to open the HID but only after creating a fake libusb-win32 filter driver (http://sourceforge.net/apps/phpbb/libusbdotnet/viewtopic.php?f=3&t=46)... I still have not been able to get HalfKay to respond to the control transfer I am trying to send and my guess is that it is due to the fake filter driver...
So, two thoughts:
Could someone create another baud setting switch that allows the teensyduino program to be restarted? (I am not sure how to approach this... any suggestions would be awesome.) So my C# program sets the baud rate to, say, 135, waits a few hundred milliseconds and then can expect (or check) that the Teensyduino program to be restarted... This would be a major help for me and I think other users.
The other thought: Does anyone have a piece of code running under Windows, Visual Studio would be great, that shows how to use the 134 baud rate switch, then do the HalfKay reset to the user program?
This has been a major time sucker for me in the last week with no forward progress. Any help or suggestions would be appreciated.
Bill