Hi all,
We're using teensy 3.2 to work as a bridge to upgrade a slave device connected to it over serial (one wire/half duplex uart). The slave device has a one wire bootloader (tinysafeboot) and main host connects to teensy over USB.
We set up teensy for one wire using the LOOPS, RSRC flags.
We are running into an issue where after resetting the slave device power and sending the bootloader activation characters, the slave device bootloader starts responding too early and teensy gets completely out of frame, recognizing nonsense characters.
Because this is a one wire communication, if the device starts transmitting before teensy shifts to receiving mode (which is the case), the whole thing gets out of sync.
It took us quite a while to get to the bottom of it but using an Osciloscope shows that the bootloader on the slave device attempts to start transmitting a few microseconds too early. Sometimes it does wait the necessary time and communication works; other times it starts too soon and teensy can't get the correct framing.
It is important to note that the slave device bootloader operates properly using an FTDI chip set up for half duplex (we tested it successfully with 2 different ftdi chips); so this is very Teensy-specific.
I've looked at the ILT setting of the processor UART_C1 field and setting it to 0 never works; setting it to 1 works sometimes.
My question - I understand this is not standard - is if you know of any other flag or option that can ease this case.
The only other alternative I can see is using a Bitbanged serial communication but I haven't come across many libraries capable of doing bitbaging and half duplex (one wire) that work on Teensy.
Do you know of any?
Any help would be greatly appreciated.
We're using teensy 3.2 to work as a bridge to upgrade a slave device connected to it over serial (one wire/half duplex uart). The slave device has a one wire bootloader (tinysafeboot) and main host connects to teensy over USB.
We set up teensy for one wire using the LOOPS, RSRC flags.
We are running into an issue where after resetting the slave device power and sending the bootloader activation characters, the slave device bootloader starts responding too early and teensy gets completely out of frame, recognizing nonsense characters.
Because this is a one wire communication, if the device starts transmitting before teensy shifts to receiving mode (which is the case), the whole thing gets out of sync.
It took us quite a while to get to the bottom of it but using an Osciloscope shows that the bootloader on the slave device attempts to start transmitting a few microseconds too early. Sometimes it does wait the necessary time and communication works; other times it starts too soon and teensy can't get the correct framing.
It is important to note that the slave device bootloader operates properly using an FTDI chip set up for half duplex (we tested it successfully with 2 different ftdi chips); so this is very Teensy-specific.
I've looked at the ILT setting of the processor UART_C1 field and setting it to 0 never works; setting it to 1 works sometimes.
My question - I understand this is not standard - is if you know of any other flag or option that can ease this case.
The only other alternative I can see is using a Bitbanged serial communication but I haven't come across many libraries capable of doing bitbaging and half duplex (one wire) that work on Teensy.
Do you know of any?
Any help would be greatly appreciated.