I am attempting to create a memory map of the PWM subsystem through the mmap() function on the Beaglebone. My code (attached) compiles and appears to be reading the correct register.
I initially hooked up the pin to a scope and went through the file system (/sys/class/pwm/ehrpwm.1:0) to output an 80% duty cycle (#echo 10000 > period_freq #echo 80 > duty_percent #echo 1 > run) this outputs the correct waveform yet I expect it to change to a 50% duty_cycle upon writing to the CMPA register.
I tried turning run off but was greeted with a "Bus error"
How can I write CMPA and other registers? what does it mean when you "write a 1 to run?"
Any help is appreciated
-Tom