2

I am thinking of joan's PIGPIO library but I am aware there are others for the RPi, and I was wondering whether there are any that support multi-master I2C mode? As far as I can tell {see here} this is a software aspect rather than a hardware one in that to support that mode the master just has to look out for (and avoid) contention on the bus - i.e. watching out for a line being high when it has taken it low. As that is also the case when a slave device is stretching the clock pulse on the SCL line and PIGPIO already handles that I guess it is possible to cover the multi-master mode as well.

  • What device are you planning to use for the second master? Another Pi? – crasic Dec 23 '17 at 2:37
  • If so it would be easier to do this through side-channel logic by using a shared line to indicate bus is busy, multi-master mode is a big PITA – crasic Dec 23 '17 at 2:39
  • I did not have anything particular in mind - but in the dim and distant past I was involved in the design of TV hardware and I recall using a bit-banging I2C interface hanging off a PC Parallel Port to tweak the operation of various ICs in TV chassis I was design/debug-ging - my friend who was writing the software for the micro-controller that was the normal master device did put in extra code that could be enabled with a NO link on the PCB that made it to either not write to the bus while the link was shorted or to go into multi-master mode (I can't recall which - it was nearly 30 years ago!) – SlySven Dec 23 '17 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.