Skip to main content
Esben Dueholm Nørgaard
Associate II
April 2, 2019
Question

How do I get the internal comparator COMP2 to work on my Nucleo stm32L073 board? (in Keil)

  • April 2, 2019
  • 1 reply
  • 1287 views

I try to modify the COMP2_CSR register on addr: 0x4001001C. But it's as if the register is locked to the default value. From the Memory viewer it seems the register is modifiable, but the COMP window still shows default value and I cannot modify the register manually from the COMP window.

APB2 SYSCFG clock is enabled. See screenshot.

0690X0000089dlVQAQ.png

This topic has been closed for replies.

1 reply

Esben Dueholm Nørgaard
Associate II
April 2, 2019

Okay I solved it. There were two things.

  1. Keil is referencing the wrong bits for the COMP_CSR registers. For some reason Keil thinks COMP2_CSR has address 0x40010034.
  2. I had routed the comparator output to PA2, which on the nucleo board is shared with USART_TX. So the short SB63 was not mounted and I was not measuring anything. I changed the output to PA7 and now it works..