Strange Hardware Serial (Serial4) Issue?

Status
Not open for further replies.

Scientist

Well-known member
I must be doing something incredibly silly here, but I am getting some strange physical behavior using the hardware UARTS on a Teensy 3.6.

To make things simple I am using the example 'EchoBoth' sketch with the following modifications:
Code:
#define HWSERIAL Serial4

void setup() {
	Serial.begin(9600);
        HWSERIAL.begin(115200);
}

void loop() {
        int incomingByte;
        
	if (Serial.available() > 0) {
		incomingByte = Serial.read();
		Serial.print("USB received: ");
		Serial.println(incomingByte, DEC);
                HWSERIAL.print("USB received:");
                HWSERIAL.println(incomingByte, DEC);
	}
	if (HWSERIAL.available() > 0) {
		incomingByte = HWSERIAL.read();
		Serial.print("UART received: ");
		Serial.println(incomingByte, DEC);
                HWSERIAL.print("UART received:");
                HWSERIAL.println(incomingByte, DEC);
	}
}

I am running this on a brand new fresh from packet Teensy 3.6.

I put a scope on TX4 (pin 32) with the scope ground on GND (next to pin 0) , and the output I am seeing looks nothing like the normal TTL serial that I am used to - the bytes are all there, and at about the right baud, but the output is bipolar +/- ~900mv and the pulses are only 20nS wide.


IMG_0030.jpg

Is there some sort of hardware setting I am missing?
 
I am pretty sure I am on the correct pin. I agree, it looks like cross talk, which makes me wonder if I need to set the multiplexer on that pin to the serial function, or something of that nature.

Serial4 Photo.jpg
 
According to the schematic - pin 32 is PTB11 which according to the K66 spec sheet has the alternate function UART3_TX, which is the UART referenced in Serial4.c So I think it is the correct pin.
 
I ran it just on a Teensy 3.6. Here's what I see on pin 32 when I type "test" in the Arduino Serial Monitor:

file.png

Here's how I connected:

t36.jpg
 
Are you sure your scope probe is good? Your waveform really looks like you're viewing through a small, series capacitor. If you touch your probe to 3.3V, do you get a stable DC line up at 3.3V on your scope screen?
 
Thanks for looking into this Paul - I will check again in the lab tomorrow. I agree that this looks like capacitive coupling - however I know this probe works in general as I use it frequently. However it may be that the tip is loose or the pin is not well soldered.
 
Status
Not open for further replies.
Back
Top