- Wed Nov 29, 2023 10:30 am
#245504
I have an Stimer capture ISR that is simple and quick. I toggle an IO pin in the ISR. Capture input is driven with a 5KHz square wave. With the scoped hooked up I can see once in a while I miss a capture IRQ, I tracked it down to coinciding with an SPI transmission. I am using Artemis ATP with Arduino IDE with latest Apallo3 2.2.1 library. I am running 2 threads with the mbed rtos. One is a 5ms thread that does the SPI master stuff, the other is a 50ms thread doing I2C and serial stuff. It seems the SPI transfer func is responsible, I have eliminated other things like beginTransaction and whatnot. I have change the capture ISR priority from 0 to 7 with no change. Tried many things, been looking inside the mbed lib and not seeing anything with am_hal_iom not seeming to touch timer ISR regs.... Any ideas? I am an embedded controls engineer for 25 years so I am not a newbie.