Author Topic: using PWM  (Read 8941 times)

DrProton

  • Guest
using PWM
« on: May 02, 2013, 11:03:45 pm »
I got my cubieboard a few days ago.  I have been poking around a bit and getting some stuff working.

One subject I cannot find much information on is the hardware PWM pins.  How can I access these from within linux?



Offline Dariush

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: using PWM
« Reply #2 on: May 25, 2013, 12:58:20 pm »
What should be written in script.bin file for corresponding pins?

Offline vinifr

  • Newbie
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: using PWM
« Reply #3 on: May 26, 2013, 09:58:27 am »
You need to select a pin and then configure the correct multiplexer: http://linux-sunxi.org/A10/PIO

Example: PB02 or PI03: both use MUX2

Note: This patch has not been applied, would be better to wait! ;)
« Last Edit: May 26, 2013, 10:03:48 am by vinifr »

DrProton

  • Guest
Re: using PWM
« Reply #4 on: June 21, 2013, 10:53:36 pm »
I followed the link to the driver and was able to  get PWM going.  However there seems to be a conflict somewhere.  Once I start fiddling with PWM I get a lot of kernel messages related to I2C transfer failures.

[  521.040000] i2c-0, xfer timeout
[  521.040000] axp_mfd 0-0034: failed reading from 0x56
[  526.050000] i2c-0, xfer timeout
[  526.050000] axp_mfd 0-0034: failed reading from 0x78
[  531.060000] i2c-0, xfer timeout
[  531.060000] axp_mfd 0-0034: failed reading from 0x5e
[  536.070000] i2c-0, xfer timeout
[  536.070000] axp_mfd 0-0034: failed reading at 0xb9
[  541.080000] i2c-0, xfer timeout
[  541.080000] axp_mfd 0-0034: failed reading at 0x30

Any idea where these are coming from and how to fix it?

Offline vinifr

  • Newbie
  • *
  • Posts: 32
  • Karma: +2/-0
    • View Profile
Re: using PWM
« Reply #5 on: July 15, 2013, 08:56:19 am »
Do you applied the patch yourself? Which pins are you using? Look for conflicts: http://linux-sunxi.org/A10/PIO
« Last Edit: July 15, 2013, 08:59:28 am by vinifr »