2022-04-22 01:12 AM
I want to test TS with one normal touchkey. I use the STM32L152RETx on the Nucleo-L152RE.
I want to use hardware acquisition mode to keep the CPU in sleep mode until a touch is registered. As I understand the UM1913 the L1 series is using TIM9 and TIM11 for that. But when I enable hardware acquisition mode, the timers are not configured in the CubeMX dialog and the settings for the timers offer no option that sounds like it would belong to the TS functionality (only input capture, output compare and PWM).
How do I configure the timers for TS? Did I oversee something obvious? I admit that the TS functionality is not really transparent to me yet...
2022-04-22 03:25 AM
Hello,
You can get TS sw examples using hw and sw acquisition modes in STM32Cube_FW_L1_V1.10.3:
./Projects/STM32L152D-EVAL/Applications/TouchSensing/TouchSensing_Linear_hwacq/readme.txt
./Projects/STM32L152D-EVAL/Applications/TouchSensing/TouchSensing_Linear_swacq/readme.txt
Set TIM9 in Master and TIM11 in slave modes.
Set-up example in api TSL_Init_TIMs located in file tsl_acq_stm32l1xx_hw.c:
TIM11 IRQ handler call the api TSL_acq_ProcessIT(), see file stm32l1xx_it.c
Regards.
2022-04-22 08:16 AM
Ah, thank you, I will look into it. That Touch Sensing libraray seems quite complex, I anticipated it to be simpler to set up. I will see what I can do on monday ;)
2022-04-26 12:57 AM
2022-04-27 08:11 AM
I see, so the timers are not configured by any CubeMX settings, but manually by settings the register values with the TSL_Init_TIMs.
This has the potential to be quite confusing over the course of a project, when other developers try to change some settings via CubeMX, don't you think?
2022-04-28 11:12 PM
Hello, Yes, I agree.
When "TouchSensing acquisition"==hardware, for sure improvement can be done like move TIM9/11 in used state. I will discuss this point with RnD. Regards.