System: MPR121 controlled by FRDM KL25

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

System: MPR121 controlled by FRDM KL25

1,072 Views
milanyudkovich
Contributor I

 

 

Development environment : IAR ver.6.6

 

System: MPR121 controlled by FRDM KL25

 

  • Problem description: can't update electrode configuration register(0x5E) while MPR121 in run mode.

 

The MPR121 is set to work in auto configuration mode (reg.0x7B=0x0B),all electrode include proximity are enabled(reg.0x5E=0x3C).

 

After the first interrupt caused by the proximity electrode I'm waiting for the release interrupt then I try to write a new setting to the register

 

0x5E=0x0C(12 ele. enable, prox ele. disable) while in run mode. After the writing I read the value of reg.0x5E  it still equals to 0x3C .

 

After the first proximity detection I want to disable the proximity and work just with the 12 key pad electrodes,

 

According to the manual the only register that is writable during run mode is 0x5E  what could be the problem?

 

The attached screen shots are the reading of all MPR121 registers values after initialization.

 

  • One more thing I use the KITMPR121EVM 12 electrode numeric keypad with the current setting (see attached files)

    a proximity detection is made approximately 2-3 cm from the keypad surface, what is the max. distance that can be reached with that keypad?   

  

Labels (1)
0 Kudos
1 Reply

762 Views
reyes
NXP TechSupport
NXP TechSupport

Hi Menahem Yudkovich,

I know that in the datasheet is mentioned that “the MPR121 registers read operation can be done at any time, either in Run Mode or in Stop Mode. However, the register write operation can only be done in Stop Mode. The ECR (0x5E) and GPIO/LED control registers (0x73~0x7A) can be written at anytime.” However, what this paragraph of the datasheet it trying to mean is that the Electrode Configuration Register (ECR) determines if the MPR121 is in Run Mode or Stop Mode, in other words, you can write to this register anytime when you want to go from RUN mode to STOP mode in order to make changes.

So, first you are getting 0x3C in Register 0x5E, then you need to go to Stop mode (0x5E = 0x00), and then change it to 0x0C in order to make what you are trying to do.

About the max distance that can be reached with the keypad, sorry, but we cannot quantify the proximity sense range of the MPR121 using the 13th proximity detection electrode, the reason is that it depends on multiple factors, i.e.:

+ The size of the electrodes (Langer sensing area gives longer proximity sensing distance),

+ Dielectric’s material,

+ Electrodes and Layout design,

+ Electric energy stored in the capacitance,

+ Electric Noise filtering, etc…

I would like to recommend you to read the following applications notes for a better understanding about how to use the MPR121 as a proximity sensor and the electrical considerations and layout patterns recommendations.

+ http://cache.freescale.com/files/sensors/doc/app_note/AN3893.pdf

+ http://cache.freescale.com/files/sensors/doc/app_note/AN3863.pdf


Have a great day,
Jose Reyes

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos