PocketBeagle: I2C on PRU

Hello, I would like to read values from a sensor that communicates with I2C at reliable intervalls (so through a PRU). Does anybody know a guide to do this or is sitting on this information themselves? I’d be glad to hear. Also, if it can be done reliably through the linux system that would be ok too.


1 Like


Usually, I try to pass a good time by relaying. So: Running a Program; Configuring Pins .

I have no education in the PRU (yet). So, I am dusty at best.


P.S. Hopefully, that will bring some joy to a user!

Thank you for your answer, what exactly do you mean with relaying (i.e from where to what)?

I’ve been following the PRUCookBook for a while (and have managed to get a 4-channel PWM going on one PRU). I suppose the material you sent refers to the configuring pins for inputs and reading them. Maybe I’m complicating things in my head, but after having set bits and gotten readings through Linux Bash (i2cset & i2cGet), I thought I may need to replicate I2C communications through the PRU. Thoughts?

1 Like


@Daniel_Sundberg , thoughts…yes.

  1. Do it!
  2. Do it again!


P.S. I think there are a couple PRU libs around and simpPRU is being worked on now currently in GSoC. I am not too familiar w/ it as of now but I think it makes working w/ PRUs a bit simpler.

Haha yeah that 's the way!

I will check it out, see if there is something I can use or take inspiration from :slight_smile: