title: Overrun errors with two USART interrupts
body: <p>Using two USARTs running at 115200 baud on a STM32F2, one to communicate with a radio module and one for serial from a PC. The clock speed is 120MHz. </p>
  
  <p>When receiving data from both USARTs simultaneously overrun errors can occur on one USART or the other. Doing some quick back of the envelope calculations there should be enough time to process both, as the interrupts are just simple copy the byte to a circular buffer.</p>
  
  <p>In both theory and from measurement the interrupt code to push byte to buffer should/does run in the order of 2-4µS, at 115200 baud we have around 70us to process each char.</p>
  
  <p>Why are we seeing occassional OREs on one or other USART?</p>
  
  <p>Update - additional information:</p>
  
  <ol>
  <li>No other ISRs in our code are firing at this time.</li>
  <li>We are running Keil RTX with systick interrupt configured to fire every 10mS.</li>
  <li>We are not disabling any interrupts at this time.</li>
  <li>According this book (The Designer's Guide to the Cortex-M Processor Family) the interupt latency is around 12cycles (not really deadly)</li>
  </ol>
  
  <p>Given all the above 70us is at least a factor of 10 over the time we take to clear the interrupts - so I'm not sure its is so easy to explain.  Should I be concluding that there must be some other factor I am over looking?</p>
  
  <p>MDK-ARM is version 4.70</p>
  
  <p>The systick interrupt is used by the RTOS so cannot time this the other ISRs take 2-3µS to run per byte each.  </p>