Using PWM on GPIO on MPR121

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using PWM on GPIO on MPR121

Jump to solution
1,344 Views
paulwilson
Contributor I

Hello,

I am using an MPR121 with 5 touch pads and 5 LED outputs. The LED outputs are on lines LED1, LED2, LED3, LED3, LED5. I can turn all 5 LEDs on and off with the set and clear registers. However, when I attempt to use PWM on the LED outputs, LEDs 1 through 4 operate as expected but LED5 does not. Specifically, if the PWN is turned off (corresponding PWN nibble = 0), I can turn LED5 on and off but if I set the corresponding PWN nibble to any value other than 0, the LED is not illuminated. I have confirmed that there is no signal at all on LED under that condition by means of an oscilloscope. Does anyone else have any experience using the GPIO outputs on the MPR121 with PWM? If so, any ideas as to why I cannot get it to work for LED5.

Tags (5)
0 Kudos
1 Solution
563 Views
paulwilson
Contributor I

Thanks Tomas, the timing works out well as we have a meeting this

morning to discuss transitioning the hardware from a prototype to the

final design.

Best Regards,

Paul

View solution in original post

0 Kudos
3 Replies
563 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Paul,

The PWM5 bit control has logic bug. Currently there is a workaround to set LED5 and LED6 with the same DAT setting (DAT[5] = DAT[6] = 1) or reconnect to ELE11/LED7 if possible.


Sorry about this. Both the datasheet and AN3894 needs to be updated to reflect this problem.


Regards,

Tomas

564 Views
paulwilson
Contributor I

Thanks Tomas, the timing works out well as we have a meeting this

morning to discuss transitioning the hardware from a prototype to the

final design.

Best Regards,

Paul

0 Kudos
563 Views
djmitch
Contributor I

Hello Paul,

I use the mpr121 on my raspberry.

The touch sensors works well.

But how can i use the inputs

To connect a led.

I found no codes anywhere.

I use python.

Can you help me ?

Thank you.

0 Kudos