On Wed, 15 Jan 2014, Donald E Haselwood wrote:

# the bus to stall until the previous operation (the write to clear the
# flag) has completed.
# 
# For example,
# void SPI2_IRQHandler(void)
# {      
#   volatile unsigned int dummy;
#  ... some code...
#   SPI2_CR2 &= ~SPI_CR2_RXNEIE;        // Turn off RXE interrupt enable
#  ...some code...
#       dummy = SPI2_SR; // Prevent tail-chaining.
#       return;
# }

        Excellent tip, thanks!

        We should add an ISR prologue option to the library, or even a 
#define. A prologue could be auto-added by the compiler, based on some 
optional keyword up front, perhaps...

        Thank you everyone,

                jeff

--
If everyone would put barbecue sauce on their food, there would be no war.

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
libopencm3-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libopencm3-devel

Reply via email to