cancel
Showing results for 
Search instead for 
Did you mean: 

ST Interrupt routine

m_j_butcher
Associate II
Posted on March 18, 2007 at 12:08

ST Interrupt routine

1 REPLY 1
m_j_butcher
Associate II
Posted on May 17, 2011 at 09:39

Hi All

I have a question about the ST code used to handle interrupt routines.

After having some strange effects when a test program was running - I had found for example that the UART interrupt was sometimes being interrupted by itself, causeing the rx byte to be written twice to the RX buffer - analysed this code.

The reason for the problem was obvious because the interrupt routine re-enables interrupts before calling the handling code - thus requiring interrupt user interrupt routines to be capable fo being re-entrant.

In a system which assumes that the interrupt mask is cleared when interrupts are called this can cause some nasty problems - after modifying the code the issue in the test system seems to be solved.

My question is whether there is a reason for enabling the interrupts in the reference file? Do most users expect interrupts to be enabled when their interrupt routines are called? I am very curious...

Regards

Mark Butcher

www.uTasker.com