title: FreeRTOS ISR at 50 KHz
body: <p>I want to blink a led (toggle a GPIO pin) <strong>synchronously</strong> with an hardware timer configured to rise an interrupt at <strong>50KHz</strong> on an ARM Cortex M4.</p>
  
  <p>In my current code, I toggle one GPIO pin into one specific ISR handler triggered on a 50KHz external clock signal. The result is that the GPIO pin is toggled very erratically at random frequencies from 1KHz to 96KHz.</p>
  
  <p>The Operating System is not running any other task apart from the Timer Tick Interrupt (100Hz with the lowest priority) the IDLE Task and my specific ISR handler.</p>
  
  <p>Otherwise, this "toggling solution" is working perfectly with a Bare Metal implementation on the same MCU. So, my problem seems to come from my lack of knowledge in the FreeRTOS environment.</p>
  
  <ol>
  <li>Is it feasible to toggle a LED into a FreeRTOS ISR at 50 KHz ?</li>
  <li>Do I need to do it into a task waiting for the 50KHz interrupt signal
  ?</li>
  <li>Should I create a timed toggling task at 50KHz and synchronize it
  periodically with the external clock signal ?</li>
  </ol>