AnsweredAssumed Answered

STM32L433: Low level driver and Comparator startup time

Question asked by Paolo Andreuzza on Nov 16, 2017
Latest reply on Dec 1, 2017 by Paolo Andreuzza

Hallo. I'm working in a STM32L433 and I'm using CubeMX tool to generate the initialization code.
I have a question regarding the comparators' Low level driver.
Although I'm using both comparator input pin (In+ and In-) connected to external port, and so I don't use the internal voltage reference, the  low level driver keep the time wait for voltage scaler stabilization, but the internal voltage reference is off and the "SCALEN" bit in "COMP1_CSR" register is set to 0.
This is a low power application so I have should return in standby mode as quickly as I can, so I shouldn't wait this startup time if it weren't neccessary.


Am I doing something wrong or it is a kind of bug in low level driver? Is there any configuration to inform CubeMX to not add the wait cycle?
How can I bypass the issue and, eventually, how can I give feedbak about this bug (If it were).
Sorry for my english and thank you in advance.


This is the generated code block:

void MX_COMP1_Init(void)


 /* Wait loop initialization and execution */
 /* Note: Variable divided by 2 to compensate partially CPU processing cycles */
 __IO uint32_t wait_loop_index = 0;
  wait_loop_index = (LL_COMP_DELAY_VOLTAGE_SCALER_STAB_US * (SystemCoreClock / (1000000 * 2)));
  while(wait_loop_index != 0)