Notes
We used GPIOB PB0 and PB4 so therefore we need to use the EXTI0 and EXTI4 external interrupts.
310Kz is our max frequency with a safety of 5 periods of the STM32F401RE clock speed
380Kz is our max frequency with a safety of 5 periods of the clock speed
410
950ns