TEENSY41_NE problem with i2c (wire2)

Looked at the alternate functions on all 12 signals which connect to the ethernet chip. None of them have I2C functionality.

My understanding of the ethernet chip is it's supposed to remain in a low power mode until configured and (probably) can't do much of anything until it hears the 50 MHz clock signal.

But just because I can't imagine any plausible cause doesn't mean it's not a real problem. If further testing on bguthik's shows this really is a case of having the ethernet chip missing causes a failure with Wire2... and if I get the chip, I'll build one of those breakboards and test it here.
 
Yeah, could solder wires, but really not excited to work with #36 enameled wire needed to make this work at 0.5mm pitch. I've done that a few time when really necessary and urgent, and every time it's been very unpleasant and taken a lot of time.

But creating a breakout PCB is quick and easy. Sent files in to OSH Park. If this is still unresolved in another week or two when this tiny PCB arrives, maybe I'll get the chip and give this a try.

View attachment 30293

Before then, I'm really hoping @bguthik can do a little more work on this. Maybe solder a socket, so it's easy to plug in either TEENSY41 or TEENSY41_NE to the same PCB.

It's still very difficult to imagine how having versus not having the ethernet chip (sitting unused) on Teensy 4.1 could possibly impact use of Wire2. But if further testing shows we really do have a weird problem, I'll get that chip by mail and run it with the test code... just like I did with the OLED display in msg #10.

@PaulStoffregen yes, I can do that. I just asked our tech to order this socket https://www.pjrc.com/store/socket_24x1.html. I will keep you posted.
 
We have been concentrating on the if (Wire2.available() >= 2) { but of course if the ic does not see a request to send then Wire2.available() will always be false.
I see that the adc is addressed relatively early in setup. It might be that the Teensy has started up and is trying to address the adc before it's ready.
A simple check to see if this is the case would be to put a delay before accessing the adc.

If you have a Logic Analyser or 'Scope that can decode I2C messages, it might be worth looking at the I2C comms as the Teensy is started and the loop() code is run.
 
We have been concentrating on the if (Wire2.available() >= 2) { but of course if the ic does not see a request to send then Wire2.available() will always be false.
I see that the adc is addressed relatively early in setup. It might be that the Teensy has started up and is trying to address the adc before it's ready.
A simple check to see if this is the case would be to put a delay before accessing the adc.

If you have a Logic Analyser or 'Scope that can decode I2C messages, it might be worth looking at the I2C comms as the Teensy is started and the loop() code is run.

I just tried by adding a delay of 1 sec before Wire2.begin() in setup() and a delay of 1sec after too. It did not help.
My condition to print ADC data is if(Wire2.available()). It should print any data valid or not, however may be the number of bytes available etc.
I will try and see if I can decode I2C messages.
 
My condition to print ADC data is if(Wire2.available()).
Yes but my argument is if the adc NEVER sees a request to send data then if(Wire2.available()) will ALWAYS return false.
 
@bguthik - Any progress on more testing of your PCB?

Those little boards arrived from OSH Park. If you're really sure this is a problem with Teensy (hardware or software) and not just a bad PCB on your end, and if you'll send me a chip by mail (still can't find any to buy), I could test it now that I have these little adaptor boards.

oshpark.jpg
 
@bguthik - Did this problem get resolved? If you still believe there really is an issue with the Wire library, please let me know.
 
Back
Top