small and fast: µs-delay with TIMER4
First suggestion after internet inquiry:// Initialization procedure: RCC->APB1ENR = 0b00000000000000000000000000000010; TIM4->PSC = 15; TIM4->ARR = 65534; TIM4->CR1 = (1<<0); // Function: void delay_US(uint32_t us) { uint32_t i; for( i = 0; i <=...