cihpkit issues on linux Mint 13

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Mon Jun 13, 2016 7:37 pm

Oh hang on, Heisenberg's rearing his ugly head. Ignore (for the moment) my comments about that "If" block - the act of measuring the effect changed the effect. I need to dig more.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

bperrybap
Posts: 48
Joined: Sat Nov 19, 2011 8:45 pm

Re: cihpkit issues on linux Mint 13

Post by bperrybap » Mon Jun 13, 2016 7:42 pm

I wonder if this delay they use in the DTWI DTWIscanner example is in there because of this same issue:

Code: Select all

	for(address = 8; address < 127; address++ ) 
	{
		// The DTWIscanner uses the return value of
		// the DTWI0.stopMaster() to see if
		// a device did acknowledge to the address.
		dtwi0.startMasterWrite(address);
		delay(10);
		if(!dtwi0.stopMaster())
		{
			Serial.print("I2C device found at address 0x");
			if (address<16) Serial.print("0");
			Serial.print(address,HEX);
			Serial.println("  !");
			nDevices++;
		}
	}
I don't understand why a delay would be needed.
--- bill

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Mon Jun 13, 2016 7:46 pm

Ok, back tracking a little here, I realised I had some test logic backwards (?!?!!!!). It's the fBusInUse flag that's making it fail.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: cihpkit issues on linux Mint 13

Post by majenko » Mon Jun 13, 2016 8:00 pm

Argh! This is brain melting!

Ok, fMyBus is saying false because the mode is idle. Therefore it's just returning without ending the master mode properly. It's saying it's idle because ... well, that's the puzzle now. Trying to find where in this mess the state is being set to IDLE when we get a NACK.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply