title: STM32 Temperature sensor power off
body: <p>I am using internal ADC temp sensor , in a low power device without the sensor in stop mode ,the uController consumes around 4 uA but when the temp sensor is on the consumption goes up to 8-9 uA 
  the problem is i can not turn the sensor OFF / i just measured the off current by setting it off from start by stmcube</p>
  
  <p>i am searching for a code that can turn off the temp sensor 
  up until now i have tested these:</p>
  
  <p>1-</p>
  
  <pre><code>HAL_ADC_Init(&amp;hadc);
  hadc.Lock=HAL_UNLOCKED;
  __HAL_UNLOCK(&amp;hadc);
  HAL_ADCEx_DisableVREFINTTempSensor();
  </code></pre>
  
  <p>2-</p>
  
  <pre><code>ADC1-&gt;CR&amp;=0X00000000;
  ADC-&gt;CCR&amp;=~(1&lt;&lt;23);
  </code></pre>
  
  <p>i prefer to work with HAL , it dose not seems to cut the Sensor power </p>