SteveBar
Well-known member
Hi ALL,
I searched for this potential issue and did not have any luck finding it... if there is info on this please LMK.
We isolated this issue using example 'Basic I/O' as a starting point (code below). There are four 5-pin MIDI connectors attached to the T3.6. UART1 Pins 0&1 and UART6 Pins 47&48 (with all the resistors, optos, etc..).
Theory of Operation:
Receive MIDI msgs into midiA port RX and send MIDI msgs to midiF port TX.
Tests:
1) Run code as is and as soon as a MIDI msg is sent the T3.6 hangs. You can hear the USB drop tune from Windows.
2) Comment out the midiF.send, un-comment midiA.send, and it works.
3) Change 'Serial6' to 'Serial(2-5)' and move HW RX and TX port wires, all the other ports work.
MIDI msgs attempted: NoteOn, NoteOff, CC
Thanks,
Steve
Conductive Labs
I searched for this potential issue and did not have any luck finding it... if there is info on this please LMK.
We isolated this issue using example 'Basic I/O' as a starting point (code below). There are four 5-pin MIDI connectors attached to the T3.6. UART1 Pins 0&1 and UART6 Pins 47&48 (with all the resistors, optos, etc..).
Theory of Operation:
Receive MIDI msgs into midiA port RX and send MIDI msgs to midiF port TX.
Tests:
1) Run code as is and as soon as a MIDI msg is sent the T3.6 hangs. You can hear the USB drop tune from Windows.
2) Comment out the midiF.send, un-comment midiA.send, and it works.
3) Change 'Serial6' to 'Serial(2-5)' and move HW RX and TX port wires, all the other ports work.
MIDI msgs attempted: NoteOn, NoteOff, CC
Thanks,
Steve
Conductive Labs
Code:
#include <MIDI.h>
// Serial hardware UART 1&6
MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, midiA);
MIDI_CREATE_INSTANCE(HardwareSerial, Serial6, midiF); // Change 'Serial6' to 'Serial(2-5)' and move HW RX and TX port wires
void setup()
{
Serial.begin(115200);
Serial.println("Starting up MIDI Serial in1/out6 test");
midiA.begin(MIDI_CHANNEL_OMNI);
midiF.begin(MIDI_CHANNEL_OMNI);
midiA.turnThruOff();
midiF.turnThruOff();
}
void loop()
{
if (midiA.read()) // If we have received a message
{
midi::MidiType msgType = midiA.getType();
byte channel = midiA.getChannel();
byte data1 = midiA.getData1();
byte data2 = midiA.getData2();
//midiA.send(msgType, data1, data2, channel); // <-- works
midiF.send(msgType, data1, data2, channel); // <-- does not work, locks up Teensy
}
}