Teensy 4.1 Lockup

Out of curiosity what kind of cane are you using and what sensor.

4 wire cable with JST-GH connectors (DroneCode I2C standard) from a Teensy 4.1 based flight controller to a custom board with 2 AMS5915 pressure transducers for static and differential pressure from a pitot-tube. Installed in a RC airplane and I have a 15 pin D-sub connector in the middle of the cable run to facilitate connecting the wing to the fuselage with a single wiring harness.

Previously I did not have the D-sub connector and was connecting the wing servos and I2C to the flight computer every flight. It worked fine enough, but kind of tough to reach some of the connectors and was error prone (easy to install the servo connectors upside down or off by a pin). Decided to clean up the wiring by added a fuselage to wing wiring harness and a left wing to right wing wiring harness. I've taken a similar approach on projects in the past with great success, but this one introduced the I2C issues.

Doing some software build-tooling work today, but hope to open the vehicle up tomorrow to investigate further.
 
4 wire cable with JST-GH connectors (DroneCode I2C standard) from a Teensy 4.1 based flight controller to a custom board with 2 AMS5915 pressure transducers for static and differential pressure from a pitot-tube. Installed in a RC airplane and I have a 15 pin D-sub connector in the middle of the cable run to facilitate connecting the wing to the fuselage with a single wiring harness.

Previously I did not have the D-sub connector and was connecting the wing servos and I2C to the flight computer every flight. It worked fine enough, but kind of tough to reach some of the connectors and was error prone (easy to install the servo connectors upside down or off by a pin). Decided to clean up the wiring by added a fuselage to wing wiring harness and a left wing to right wing wiring harness. I've taken a similar approach on projects in the past with great success, but this one introduced the I2C issues.

Doing some software build-tooling work today, but hope to open the vehicle up tomorrow to investigate further.

Thanks for the info Brian. Wondering if its an issue with the connector have to see if I can jury rig something up if I can find my D-sub connectors - have a couple around. Probably easier just to buy a couple.
 
Thanks for the info Brian. Wondering if its an issue with the connector have to see if I can jury rig something up if I can find my D-sub connectors - have a couple around. Probably easier just to buy a couple.

Anecdotally, the JST-GH connectors aren't great either and I'm glad the industry is moving away from I2C on cables and towards CAN; although, the protocol is a discussion for another day.

Might be the connector. I need to double check my crimping and soldering. I also need to check with servo power off and on, in case it's EMI from the higher current wires. Could take a bit to track down.
 
Doesn't seem like a simple replace -

Yeah, not so surprising it didn't work. But you did get the splash page, so it did start with that JRE, then something went wrong...


if these steps replaced the JRE executables?
Downloaded the : OpenJDK8U-jre_x64_windows_hotspot_8u302b08.zip
and replaced in : C:\T_Drive\Arduino_1.8.16_155 - Copy\java { my Arduino is from ZIP so nothing installed in \Programs }

The "C:\T_Drive\Arduino_1.8.16_155 - Copy\arduino.exe" then shows first load image and goes away.

No Joy. Something is expecting 32b - or some other element customized or added missing or not prepared to swap 32 for 64 bit?

I believe the Windows version of Arduino has 2 launcher programs, where the "debug" one is meant to open a command prompt (or maybe be run from a command prompt?) to show you Java exceptions. Honestly, I've never run it, as I use the Linux version and always go to quite a bit of effort to make sure everything Teensyduino does with the Java stuff is compiled with the exact same JDK Arduino is using for development. But I've seen that alternate debug launcher and my understanding is it's main purpose is to give access to Java exception messages on Windows when the IDE crashes.

If you really want to fiddle with 64 bit Java, that's the path forward.
 
Might be the connector.

The Wire library should never lock up, no matter what you've done wrong with the signals. We'll, short of damaging Teensy's hardware.

All sorts of things could explain a communication problem. I'm interested in any of those problems which the Wire library doesn't handle properly and return an error.
 
Yeah, not so surprising it didn't work. But you did get the splash page, so it did start with that JRE, then something went wrong...

I believe the Windows version of Arduino has 2 launcher programs, where the "debug" one is meant to open a command prompt (or maybe be run from a command prompt?) to show you Java exceptions. Honestly, I've never run it, as I use the Linux version and always go to quite a bit of effort to make sure everything Teensyduino does with the Java stuff is compiled with the exact same JDK Arduino is using for development. But I've seen that alternate debug launcher and my understanding is it's main purpose is to give access to Java exception messages on Windows when the IDE crashes.

If you really want to fiddle with 64 bit Java, that's the path forward.

Was hoping with your JRE know how, and IDE insight, there was a clear path and easy fix. Without that - and other complications likely with the IDE's usage - I'm not sure it could work, especially with my ham handed swapping.
 
Haha, I'm nowhere near that good with Java! I might not even have an idea of what's really wrong even if I could see the exception info and stack trace.
 
Anecdotally, the JST-GH connectors aren't great either and I'm glad the industry is moving away from I2C on cables and towards CAN; although, the protocol is a discussion for another day.

Might be the connector. I need to double check my crimping and soldering. I also need to check with servo power off and on, in case it's EMI from the higher current wires. Could take a bit to track down.

Haven't looked in a few years but if are you referring to UAVcan or CANAerospace. Did a port of UAVCan to the T3.x's about 3 years ago but kind of left it by the wayside, they were making the implementation a bit more complicated for the messages. CANAerospace was looking at the time but never did a port of it: https://github.com/mjs513/CANaerospace. :)
 
Haven't looked in a few years but if are you referring to UAVcan or CANAerospace. Did a port of UAVCan to the T3.x's about 3 years ago but kind of left it by the wayside, they were making the implementation a bit more complicated for the messages. CANAerospace was looking at the time but never did a port of it: https://github.com/mjs513/CANaerospace. :)

I like CAN Aerospace and ARINC 825. I think CAN Aerospace's documentation is excellent and the protocol is very straightforward. ARINC 825 also has excellent documentation; although, it costs around $300 to access the standard, and is more bit efficient than CAN Aerospace.

I'm slowly working on libraries for CAN Aerospace and ARINC 825.

I understand the motivation behind UAVCAN, but I struggle hard with its documentation.
 
I like CAN Aerospace and ARINC 825. I think CAN Aerospace's documentation is excellent and the protocol is very straightforward. ARINC 825 also has excellent documentation; although, it costs around $300 to access the standard, and is more bit efficient than CAN Aerospace.

I'm slowly working on libraries for CAN Aerospace and ARINC 825.

I understand the motivation behind UAVCAN, but I struggle hard with its documentation.

I do agree with you UAVCAN is a bit confusing and it got more confusing as time progressed as least with the version I was using. Be interesting to see your implementation of the CAN Aersospace and Arinc 825
 
I am having trouble as I can't see upload sketch, i get error

Sketch uses 248972 bytes (23%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28144 bytes (34%) of dynamic memory, leaving 53776 bytes for local variables. Maximum is 81920 bytes.
An error occurred while uploading the sketch
error: cannot access usb:14200000

error: espcomm_open failed
error: espcomm_upload_mem failed

Boot loader works perfectly fine as documented here https://www.pjrc.com/teensy/first_use.html

I see serial port to contain name "(Teensy 4.1)" so I am assuming it has recognized.
 
Actually I am good now. All I have to do is click on board manager and change to Teensy 4.1, USB detecting doesn't mean board can be remapped automatically. I was using ESP earlier.
 
Back
Top