TomE wrote:
Kef wrote:
> Are you toggling port B and port A pins from both, main thread and from interrupts?
Well spotted. I considered that, but have been reading TurboBob's posts for a long time and didn't even consider that he might have fallen into that newbie trap. Bob, tell us it ain't so! 
it aint so

no, I was toggling from 2 different interrupts, the other one was a compare on a timer channel to generate a square wave, but was mutually exclusive from this one based on a mode flag.
and I commented it out, "just in case"
and I searched my own code for "leftovers" , none found.
So, hopefully no newbie mistakes here.
The pin write I was not 'toggling', but writing to the opposite state every-other interrupt, so the pin write was
like this (this one is a different pin, but you get the idea)
#define WindowSwOutput_SetVal() ( \ (void)setReg8Bits(PTFD, 0x20) /* PTFD5=0x01 */, \ Shadow_PTF |= (byte)0x20 /* Set appropriate bit in shadow variable */ \ )
so its a one-liner, except for the shadow register.
and, if it were related to another call in the main line of the code, I would expect it not to be synchronous with the end of the ISR every time.
I tried putting my pin write at the beginning, middle, end of the ISR, put it twice, lots of strange versions of it. I'm 99.x% sure its not me.
My thoughts are leaning towards a wierd pipeline issue related to the archeitecture..... a real wierd one.
So it may become an SR when I get the chance to boil it down to something the FSL guys can play with in the lab.
But, your guy's input is helpful as a sanity check, thanks for jumping in.
Either of you guys have the JM demo kit with the CF processor?
Bob