Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-8451 I2C Locking Up

Hello Everyone!

 

I'm having a problem with my USB-8451. Currently I am running a labVIEW program that uses the USB-8451's I2C lines to communicate with up to 5 slave devices. At random intervals the 8451 locks up and the green LED (which is normally blinking) stays solid. Unplugging the USB and plugging it back in fixes the problem, but all data transferred during lock up is lost. This is especially problematic when running overnight tests.

 

I have searched these forums and found that other people have fixed this problem by using a USB hub. I have since hooked up a USB hub (which can source 500mA is this enough?) with external power. This helped tremendously and seemed to cut down the number of lock ups significanly, but it still locks up from time to time (can run for days without locking up, or other times it will lock up in under an hour). I haven't been able to reproduce the occurrence, so far it seems to happen randomly. 

 

When the lock up occurs the LabVIEW program isn't frozen, I can still click buttons and change tabs etc. but no new data is coming it. When I unplug and replug the device, everything returns to normal. I have had this problem for a while and I've seen it universally on a variety of different computers, with multiple different LabVIEW programs and different types of USB hubs.

 

I haven't been able to find a solution on the forums, can anyone help me?

 

I'm using LabVIEW v8.6

0 Kudos
Message 1 of 4
(3,607 Views)

Hi Aaron,

 

I'm sorry to hear you are having this issue, it does seem to be something that is intermittently happening in multiple cases. One question I have for you is are you using clock stretching? The 8451 has a built in watch dog timer that is supposed to prevent these kind of lockups but it becomes disabled to allow clock stretching. So if you are using this function it seems like the only way to reset the device is to unplug it when it trips up.

 

Regards,

Peter W.

0 Kudos
Message 2 of 4
(3,596 Views)

No, no clock stretching as far as I know, I've just used the basic I2C scripting functions that come with the device and I haven't seen anywhere to enable clock stretching. Unless maybe its enabled automatically? Or is there some way to enable the 8451 watchdog timer? Or at least check its status?

 

Thanks!

-Aaron

0 Kudos
Message 3 of 4
(3,575 Views)

Hey Aaron,

 

As I understand it, the clock stretching isn't a functionality that you enable but is something that is caused by the slave device running at a slower clock rate than is naturally supported by the board. If you can determine the clock rate of your device then you can compare that to the supported rates of the 8451 I^2C Interface (in the user manual on page 12, linked below) and determine if any clock stretching is occurring.

 

http://www.ni.com/pdf/manuals/371709b.pdf

 

The timeout function should automatically enable, it only disables when the clock is stretched so that it does not accidentally see the slower response times as a board malfunction and continually reset the device. Unfortunately there isn't a way to manually activate the timer and the status is determined by the clock rate.

 

Regards,

Peter W.

0 Kudos
Message 4 of 4
(3,491 Views)