Software (Blegh) - mjgardes/mppt3 GitHub Wiki

LTC4151 driver: https://github.com/beagleboard/linux/blob/4404e719e231bd5e2b7fa297c7cf965c100b2f3f/drivers/hwmon/ltc4151.c

PWMSS documentation: http://phytec.com/wiki/images/7/72/AM335x_techincal_reference_manual.pdf#page=1485

The clearest instructions I've found so far for writing drivers: LDD3 and example code found at https://github.com/martinezjavier/ldd3

Now to just mash this all together into one big kernel module.

Step 1: Get module code to build, load, unload. Done.

Step 2: Plan.

Try to implement the classic "perturb and observe" algorithm. I have a better idea in mind, but lets get something simple working first.
The controller will measure Pin, tweak a setting, measure delta. Maybe repeat a few times to measure noise and/or account for quantization error.

Step 3: Smoosh chunks of example code together.

Read input side V and I (preferably simultaneously) and calculate P. Do this in kernel to reduce context switching. Done. Edited ltc4151.c to export that in /dev/.

Now editing the ehrpwm module to set up the correct waveform.

Oh shit, the beaglebone devs have baked tiehrpwh into the kernel!

I guess we're rebuilding the whole thing from source now.

the actual kernel source: https://github.com/RobertCNelson/linux-stable-rcn-ee/commits/3.14.43-ti-r67