Hello Annamol:
According to your mask sets, both are Rev 2.x parts. First thing to avoid confusion you should download the Reference Manuals for K5x that end with "V2RM", the V2 indicates that the manual is for Rev 2 parts.Below are the links to the correct Reference Manuals:
K52P144M100SF2V2RM
K53P144M100SF2V2RM
Then some general comments about your questions and configurations:
- Yes, it is possible to wakeup from VLPS with TSI. And you are right, Out-of-range interrupt is only valid in low power mode.
- Do not enable the module (GENCS[TSIEN] = 1) until you have finished with configurations.
- The counter registers are not updated in low power mode. Instead you have a separate register (TSIx_WUCNTR), which stores the counter value for the selected Wake-up electrode.
- TSI0_THRESHOLD should not be 0x00000000. The threshold register is used to configure Upper and Lower limits. If the electrode counter result is outside of this range at the end of scan, then the Out-of-rage interrupt is triggered. You need to calibrate the range.
I recommend you to download the code package "KINETIS512_V2_SC", which includes an example TSI project for IAR. The package is available from the "Software and tools" tab:
K50_100 |Kinetis K50 100 MHz MCUs|Freescale
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------