BUG: HAL_TSC_GroupGetStatus gives wrong results
In STM32Cube_FW_L0_V1.11.2\Drivers\STM32L0xx_HAL_Driver the function TSC_GROUP_COMPLETED in Src\stm32l0xx_hal_tsc.c returns TSC_GROUP_ONGOING even if it should return TSC_GROUP_COMPLETED.
This is due to
#define __HAL_TSC_GET_GROUP_STATUS(__HANDLE__, __GX_INDEX__) \
((((__HANDLE__)->Instance->IOGCSR & (uint32_t)(1UL << (((__GX_INDEX__) & (uint32_t)TSC_NB_OF_GROUPS) + 16UL))) == (uint32_t)(1UL << (((__GX_INDEX__) & (uint32_t)TSC_NB_OF_GROUPS) + 16UL))) ? TSC_GROUP_COMPLETED : TSC_GROUP_ONGOING
in Inc\stm32l0xx_hal_tsc.h
Where (__GX_INDEX__) & (uint32_t)TSC_NB_OF_GROUPS always evaluates to 0 while it should evaluate to __GX_INDEX__. The result is that accidentally always only group 1 (__GX_INDEX__ = 0) is evaluated.
In this case (TSC_NB_OF_GROUPS-1) instead of TSC_NB_OF_GROUPS would work (as long as TSC_NB_OF_GROUPS is a power of two).
Is there a better place to report bugs (e.g. an issue tracker) than this forum?
