Ported to STM32Cube HAL Driver (from Standard Peripheral Driver)