Closed austinphillips2 closed 3 years ago
Hi @austinphillips2,
Thank you for your contribution. A fix for this code below :
will be published soon in a future release (STM32L0Cube V1.12.0
) looks like the following:
+ #define __HAL_TSC_GET_GROUP_STATUS(__HANDLE__, __GX_INDEX__) \
+ ((((__HANDLE__)->Instance->IOGCSR & (uint32_t)(1UL << (((__GX_INDEX__) & 0xFUL) + 16UL))) == (uint32_t)(1UL << (((__GX_INDEX__) & 0xFUL) + 16UL))) ? TSC_GROUP_COMPLETED : TSC_GROUP_ONGOING)
Thank you again for your contribution.
With regards,
ST Internal Reference: 62853
Hi @austinphillips2,
I hope you are fine. The issue you reported has been fixed in the frame of version v1.12.0 of the STM32CubeL0 published on GitHub.
Thank you again for having reported.
With regards,
The __HAL_TSC_GET_GROUP_STATUS macro is used to return the conversion status of an individual TSC group.
#define __HAL_TSC_GET_GROUP_STATUS(__HANDLE__, __GX_INDEX__) ...
The
__GX_INDEX__
field is incorrectly masked in the#define
definition resulting in the status being returned for TSC group 0 rather than the group requested by__GX_INDEX__
.This issue has previously been reported and acknowledged at https://community.st.com/s/question/0D50X0000ASrqJjSQJ/bug-in-stm32l0-tsc-library but a fix has not been made available in this repository.