On Wed, 15 Jan 2014, skeezix wrote:
# Continuing the hunt ..
Newest finding..
If I twiddle the isr function around a bit, and make it _last
longer_, everything is peachy. Of note:
void tim2_isr ( void ) {
TIM_SR(TIM2) &= ~TIM_SR_UIF; /* Clear interrrupt flag. */
unsigned long int j;
for ( j = 0; j < 100; j++ ) {
__asm__("nop");
}
gpio_toggle(GPIOC, GPIO3); /* LED on/off. */
}
The 'clear the interupt' bit has to be first thing; moving it to
bottom (where it 'feels right') breaks everything.
The delay needs to be there.. _something_; just a few NOPs, or the
volatile assignment, or something.
Guess: is it double-calling, and thus needs to block itself so it
doesn't "double toggle" and look to do nothing? ..
.. we're slowly getting there, but w-t-heck :)
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