Delay function with TIM14 in nucleo G031K8
void TIM14_init(void){ RCC->APBENR2|=(1<<15); TIM14->PSC= 31; TIM14->SR=0; TIM14->CNT=0; TIM14->EGR|=(1<<0); } void TIM14_delay_us (int delay_us){ TIM14->ARR = delay_us; TIM14->CR1|= (1<<0); // counter enabled while (!((TIM14->SR)&1)); // wai...