problem i2c TIMEOUT!

Hacking multi-tool. Get one for $30, including worldwide shipping.

problem i2c TIMEOUT!

Postby funstuf » Fri Sep 16, 2016 3:03 pm

hello,
i have a big problem using i2c whit the buspirate.
it seems there is a long delay after a start condition and any ACK/NACK.
IT IS ALMOST 2mS long.
and it is getting even longer when the baud rate of the buspirate is set to a lower rate.
normal i2c devises do not seem to care, sofar i could test it.
but i am trying to talk whit a smbus device, and that one does not like those long timeouts.
here a screenshot from my logic analyzer.
Naamloos.png

can anyone tel me whats is going on?
i am able to program the pic and i have the sours code open in mplab.
but i do not understand C/C++ completely.
can anyone help me to fix this problem?
funstuf
Newbie
Newbie
 
Posts: 3
Joined: Fri Sep 16, 2016 2:33 pm

Re: problem i2c TIMEOUT!

Postby mikeb » Fri Sep 16, 2016 6:49 pm

I have never used I2C together with a Bus Pirate, but I think you might try updating your firmware,
especially could try out the firmware builds with speed optimization. I will upload it soon to this thread:
viewtopic.php?f=28&p=65284#p65284
This might be not a full solution, but maybe it could improve the situation?
mikeb
Newbie
Newbie
 
Posts: 39
Joined: Fri Sep 09, 2016 2:50 am

Re: problem i2c TIMEOUT!

Postby funstuf » Sat Sep 17, 2016 2:54 am

this is the firmware that is in the pic.

Bus Pirate v3.5
Firmware v6.1 r1676 Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)

it looks like that this is the latest firmware.
funstuf
Newbie
Newbie
 
Posts: 3
Joined: Fri Sep 16, 2016 2:33 pm

Re: problem i2c TIMEOUT!

Postby mikeb » Sat Sep 17, 2016 1:00 pm

funstuf wrote:it looks like that this is the latest firmware.


No the latest is firmware 7.0 - you can get it here:
viewtopic.php?f=28&t=8498#p65290
You have BPv3 so you need to extract bpv3_fw7.0_16092016.zip,
and could try "_opt2_" firmware build (optimization for speed)

You bootloader is not the latest too - I am sure there were commits since your build.
But I can't find a project file for BPv3 bootloader, so you woud have to use the old bootloader for a while
mikeb
Newbie
Newbie
 
Posts: 39
Joined: Fri Sep 09, 2016 2:50 am

Re: problem i2c TIMEOUT!

Postby funstuf » Sat Sep 17, 2016 4:59 pm

thanks mikeb,
i have programmed the version that you have proposed , but the problem i have is still the same.
i have tried to use a different terminal: hyperterminal and realterm, also connected the buspirate to a tablet , but the problem i have is still the same.
funstuf
Newbie
Newbie
 
Posts: 3
Joined: Fri Sep 16, 2016 2:33 pm

Re: problem i2c TIMEOUT!

Postby mikeb » Sat Sep 17, 2016 6:00 pm

funstuf wrote:i have tried to use a different terminal: hyperterminal and realterm, also connected the buspirate to a tablet , but the problem i have is still the same.

hmm.... i never worked with i2c so sorry my help is limited by my experience... the only idea i have now is to try doing all this under Linux. If you don't have a PC with Linux already installed, maybe you could run Ubuntu LiveCD (or "LiveUSB" if you put this .iso to USB instead of hard drive).
1) Boot into a temporary environment (stored in RAM)
2) Install some i2c software (it will be also stored temporarily in RAM and will disappear after you shutdown your PC)
https://help.ubuntu.com/community/LiveC ... eCD_Ubuntu
Not sure if this could help but i just don't have any other ideas currently...
mikeb
Newbie
Newbie
 
Posts: 39
Joined: Fri Sep 09, 2016 2:50 am


Return to Bus Pirate Support