STM32 routine - very full