STM32 - ADC based temperature measurement on FreeRTOS
I'm not 100% sure about HAL but I think you only read the value from the registers - it doesn't start the conversion. Software trigger means that you need to manually start the conversion. Look for a function which does that in HAL.