Teensy 3.5 RX1 PTB16 RX1

Status
Not open for further replies.

Wayne

Well-known member
I seem to be having an issue with the RX1 input to the Teensy 3.5 Serial1.begin(9600, SERIAL_8N2); seems to fail reading in correctly.
The older 3.2 I use to use would read the values from a system as 55 then 50, and last 42. This program would respond to each code and send a HEX code out. This has worked forever on the boards.
Now I have converted the program from 3.2 to 3.5 and now I have this happening
The codes now are 60 (for 55), 68 (for 50), and 41 (for 42). I have no idea what is going on with the code. Makes no since. I can place an older board in and is the codes are ok. The output HEX is ok to the system.

I can change the program to use the codes I see, but... I hate to do that without knowing why.

I need to add, that the other serial ports 2,3, and 4 work fine.. One is 57600 while the others are 9600. The codes communication are correct.
Just the serial1 thats 9600 Serial_8N2 fails. Unless I missed a change somewhere for 3.5..
 
Last edited:
In order to understand and to satisfy my scientific curiosity: what happens when you read the codes sent out with Serial1 back with Serial2 (kind of loopback test without external h/w involved) ?

And the wrong return codes you mention (60 for 55, 68 for 50, 41 for 42) is this HEX or decimal ? I try to find a pattern...

And, last question, what happens if (still without your external system) you feed the return values from a terminal program? Is the decoding still wrong?
 
On the system, it would read Decimals. 1st is 55, when I saw that I would send HEX back. The 50, then send a HEX back and the last 42 and start touch screen.
More info:
This is on a workstation for C-Arm systems. I have used the Teensy 3.2 IC's and boot for a few years (3 I think) and has worked great.
The steps for communication for touchscreen operation is set to 9600 8N2.
The workstation sends 4 or 5 CR (13's)
The it will ask how big a touchscreen are you (55), I send back 85x85 (had Leds and IR's), then it will ask does the touchscreen have errors (50)(old days ment LED or IR bad), I send NO (forgot code)
It will then say enable touchscreen operation (42), at the point I enable the panels touchscreen and light an LED to show communication is OK
So what I get is a 60 for 55, 68 for 50. Since this is in error, I never get to the last part, but the code thats bad is 41.

Ironically, I have a sleep function with 2 serial connections, kinda like the touch, but it asks and echos ok at just 9600 baud.. Nothing special.

So it looks like the 9600 8N2 can be an issue.

I need to add, the proto setup, an actual Teensy 3.5 wired to our board with the uPc and bootloader removed worked originally. I have since update Arduino and teensy loader.
 
On the system, it would read Decimals. 1st is 55, when I saw that I would send HEX back. The 50, then send a HEX back and the last 42 and start touch screen.
More info:
This is on a workstation for C-Arm systems. I have used the Teensy 3.2 IC's and boot for a few years (3 I think) and has worked great.
The steps for communication for touchscreen operation is set to 9600 8N2.
The workstation sends 4 or 5 CR (13's)
The it will ask how big a touchscreen are you (55), I send back 85x85 (had Leds and IR's), then it will ask does the touchscreen have errors (50)(old days ment LED or IR bad), I send NO (forgot code)
It will then say enable touchscreen operation (42), at the point I enable the panels touchscreen and light an LED to show communication is OK
So what I get is a 60 for 55, 68 for 50. Since this is in error, I never get to the last part, but the code thats bad is 41.

Ironically, I have a sleep function with 2 serial connections, kinda like the touch, but it asks and echos ok at just 9600 baud.. Nothing special.

So it looks like the 9600 8N2 can be an issue.
 
Would you like me to try running some tests here on a Teensy 3.2 and 3.5? I could connect those to a FTDI USB-serial cable and watch the data with my oscilloscope. But what exactly to send from Teensy to the PC, and what message to send from the PC to the Teensy? If I go to the trouble to set this test up, should I send the characters "55" or something else? I must say, there's a lot of mention of hex and decimal and other stuff, but it's not clear to me what actual bytes are expected to be send and received.
 
I will post the code that has the issue. Maybe too big, I zip it up.

Code is uploaded.

I think I have most info rem'''
 

Attachments

  • 9600-9600_Interface_1st_part.zip
    3.9 KB · Views: 76
Paul,
The recv is Decimal that I read in, but I send HEX back out because the machine understands that better.
You should see that in that part of the code.

So besides this, we have an IT guy looking for Hard drive and pulling me away. They wanted me drive that I use from my computer.. They can not have it!
 
Don't do anything. I might be missing something in the code. I did a compare of reads between the old and new and find the last code needs something.

So hold the phone and I will report back.
 
Ok, how much faster is the 3.5 vs the 3.2 uPc.
I dug up my old notes from when I was developing this back in 2014 and found the string of code from the workstation. HEX (Decimal and Action)
Start:
0D (13 '5' CR's)
3C (60 Software Reset)
44 (68 Report Transfer On)
32 (55 Get Error Report) Send F8 00 (no errors) FF
29 (41 Add Exit Point Monitor) Not used
37 (55 Get Frame Size) Send F4 55 55 FF On this system wit IR, it had 0-85 Hex locations both Vertical and Horizontal
2A (42 Touch Screen On) Enable touch system. In my case, I enable the Flat Panel touch and light a LED that communication success
BTW, this is a ELO Smart Frame Protocol

On the 3.2, the code made it all the way, 3.5 it stops at 3C (68) Which looking at the info for this on ELO, there is no software sent to the workstation after the command is received.
But I have faked it out by duping it. I just give 3C (60) and 44 (68) a response and the flow continues.
So I have it running on the 3.5 with some software responses added that originally was not needed.

Thanks for looking into this. I had at stake 50 boards with parts. I can no go ahead and have them made completed.
Phew
 
Status
Not open for further replies.
Back
Top