I started developing my first Touch Sensing application on my Kinetis K20DX256VLH7-based custom board. I use CodeWarrior 10.2 (full updated), MQX 3.8.1 and TSS v2.6. I added the TSS_Library component to the Processor Expert project used in my BSP library (which I cloned from the bsp_twrk20dx72 sample library).
On my custom board I have six electrodes and I handle them as a TSS Keypad Control through the K20 TSI module.
I configured the TSS_Library component with standard settings, in order to tune them through the FreeMASTER tool on my PC communicating with the RS485 port on my board (I use a USB-RS485 cable from FTDI).
After many efforts, I finally have a compiled BSP and a MQX compiled application with the Main_task that initializes both FreeMASTER resources and TSS and then waits for a touch/release event from the keypad.
But unfortunately I get no such event when my application is running. Where am I wrong?
I configured TSI with AUTO trigger mode with Auto_Trigger_Modulo_Value = 255. With the debugger I verified the TSI registers: the six electrode inputs are properly defined and enabled; the TSI module is enabled, the TSI interrupt is enabled. TSI clock is the bus-clock (48 MHz) with prescaler = 1.
With my scope on each electrode I see the external frequency signal generated by TSI: when I change the electrode capacitance with my finger I see the frequency become a little bit slower.
But I don't understand why TSI scans my keypad every 250ms. Which TSI register configures that time?
On the FreeMASTER tool I have the communication properly running. The TSS System and Keypad Control configuration are as I expected, but all the Baseline, Delta and Signal variables are equal to 0.
I attach my BSP Processor Expert project, the produced TSS_SystemSetup.h header file, my application Main_task source code and my FreeMASTER GUI project.
Can anyone help me to have TSI working properly?
Original Attachment has been moved to: ProcessorExpert.pe.zip
Original Attachment has been moved to: UG8_GUI.pmp.zip
Original Attachment has been moved to: main.c.zip
Original Attachment has been moved to: TSS_SystemSetup.h.zip