Hi Alberto,
I checked your code and in the main() function is placed following strange while loop:
while (EventCounter < MAX_EVENTS) {
TSS_Task();
}
It means that if the counter EventCounter reaches MAX_EVENTS then TSS_Task() is not called anymore and TSS stops to work. That is the reason why callback is not generated anymore. TSS_Task() should be called permanently.
Best Regards
Peter Moravcik
TSS SW team
Hi Alberto,
I checked your code and in the main() function is placed following strange while loop:
while (EventCounter < MAX_EVENTS) {
TSS_Task();
}
It means that if the counter EventCounter reaches MAX_EVENTS then TSS_Task() is not called anymore and TSS stops to work. That is the reason why callback is not generated anymore. TSS_Task() should be called permanently.
Best Regards
Peter Moravcik
TSS SW team
You are right!
The strange loop comes straight from the Tower KL25 TSS example, in C:\Freescale\CW MCU v10.3\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\TWR-KL25Z48M\TSS\Sources.
This nasty death countdown can be confusing, IMHO.
One less thing to worry about, thanks a lot.
Hi Alberto,
Please, check what is really written in the TSS_SystemSetup.h file. TSI electrode assignment is defined by macro TSS_Ex_TYPE. Be aware you have to do 'Generate Processor Expert Code' if you change anything in the TSS component configuration and then TSS_SystemSetup.h file is completely regenerated.
Best Regards
Peter Moravcik
TSS SW team
Hello,
the example for the freedom boards KL25 and KL05 are part of the TSS release (3.0 and 3.0.1 as far as I remember). You can check them out. If you have any doubts, please read User guide which provides useful information :smileywink:
I don't see any problem with counter in the callback. Even though it might overflow, that does not explain why callback is not generated after 10 touches.
Regards,
MartinK