LC Doesn't Repond to Reset Button

Status
Not open for further replies.

emarsh

Member
I'm doing some work with an LC using both i2c channels. Sometimes the LC will hang and pressing the reset button won't bring it back so I have to pull and replace the power lead.

This is not a huge problem but I'm curious as to why this might be happening.

Also, this morning I noticed that when I attach a logic probe to the LC and run my program that uses i2c to pass data between the Teensy and a Pi after a few seconds the Teensy hangs and won't come back. The probes are properly grounded and the behavior stops when I remove them. Any ideas why?

Thanks,

Eric
 
Actually there is no reset button. The button is actually a "Program" button, and when pressed puts the teensy into program mode waiting for a new program to download.

As for why hang, not sure... What type of logic probe,... Also helps to have more information, program code...
 
Actually there is no reset button. The button is actually a "Program" button, and when pressed puts the teensy into program mode waiting for a new program to download.

As for why hang, not sure... What type of logic probe,... Also helps to have more information, program code...

Well - that's useful.

My hang problem with the probe went away. The probe is a Saleae Logic 8. I've noticed that the Teensy is sensitive to anything that might degrade the i2c signal. The probe has about an 8" lead - I've got another 8" from there to the breadboard. Then there is are 4" leads between the LC and the Pi.

I'm using the Pi to power the LC and a few sensors. I wonder if voltage might contribute to things.

My code is nothing spectacular on the Teensy side. I'm using Wire and Wire1. This is the bulk of it:

Code:
// In setup

// register events
  Wire1.onReceive(receiveEvent);
  Wire1.onRequest(requestEvent);

// In body
//
// handle Rx Event (incoming I2C request/data)
//
void receiveEvent(size_t len)
{
  if (Wire1.available())
  {
    addr = Wire1.readByte();
  }
}

//
// handle Tx Event (outgoing I2C data)
//
void requestEvent(void)
{
  Wire1.write(mem[memPtr][addr]); // fill Tx buffer (from addr location to end of mem)
}
 
I ran into this problem when I powered the teensy from an isolated power supply, it was very sensitive to touching anything connected to it. When I inserted a USB cable (for data connection, VUSB cut), the problem vanished, I guess because the system now had a proper GND connection to the rest of the world through the USB GND.
 
I ran into this problem when I powered the teensy from an isolated power supply, it was very sensitive to touching anything connected to it. When I inserted a USB cable (for data connection, VUSB cut), the problem vanished, I guess because the system now had a proper GND connection to the rest of the world through the USB GND.

Thanks for the tip - I'll take a look at that.
 
Status
Not open for further replies.
Back
Top