This anomaly applies to Revision 3, build codes QFAA-Gx0, QFAB-Gx0, CIAA-Gx0.
COMP does not compare correctly.
Always.
COMP module is unusable.
*(volatile uint32_t *)0x40013540 = (*(volatile uint32_t *)0x10000324 & 0x00001F00) >> 8;
This workaround is included in MDK version 8.12.0 and later.