Skip to main content
Visitor II
April 25, 2020
Question

Comparators vs DWT

  • April 25, 2020
  • 1 reply
  • 799 views

Hi guys,

i just wanted to mention that there is a ****** in the header files.

I am using an STM32G474:

Just an example - stm32g474xx.h defines

#define COMP3 ((COMP_TypeDef *) COMP3_BASE)

And core_cm4.h uses

 __IOM uint32_t COMP3; /*!< Offset: 0x050 (R/W) Comparator Register 3 */

as part of DWT_Type.

Same applies to COMP2 and so on.

Good luck fixing this. Basically you have to rename the comparators.

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    May 4, 2020

    Hi @Albi G.​ ,

    Thanks for raising this issue. It is reported internally.

    -Amel