Simple PRU examples

Hi,

I’ve just been through the learning curve of getting started with PRU development, and have pushed some simple examples to GitHub.

Posting here in case they’re of use to anyone else in the same position…

https://github.com/dresco/pru_examples

Regards,
Jon

Thanks! The minimalism is nice. Have you tried any of the other tools like the PRU GCC compiler, Pruspeak or the web-based PRU debugger to see if they are helpful?

oh, and the “Arduino” port attempted by the students of John Brown University: https://github.com/lucas-ti/PRdUino

I haven’t had a chance to try that one out. A quick look a the code makes it seem pretty incomplete. I don’t see most of the Arduino functions.

As an effort to quickly generate functions to support additional peripherals, the BeaglePilot folks tried out compiling Starterware for the PRU and had some success: https://github.com/BeaglePilot/PRUSS-C

They never fleshed out any real testing or put it into any packaging, but I think it is an approach that could save a lot of work or at least give examples for learning for a cleaner implementation.

Your sensibilities about simplicity just seem right, so I’m curious about your thoughts on these various efforts to simplify PRU programming.

Hi,

No not really, not yet at least.

My immediate needs are pretty simple - just wanting to decouple any timing sensitive bits from my user space Linux code. Just frequency measurement, pwm etc..

I started off by downloading the TI PRU C compiler, but struggled a bit with the lack of examples (or maybe I just wasn't looking in the right places!). But yes, is fair to say I'd probably have used C if I'd stumbled across a useful library and documentation/examples sooner.

Anyway - I think it was a useful learning exercise going right back to basics, as all the features and peripherals of the BBB can be a bit overwhelming when moving from something like an AVR :wink:

Regards,
Jon