I'm trying to write some code for the stm32f103c8t6 microcontroller. It is constantly communicating with a device, which requires interrupts to be disabled... however, this also needs to be interrupted immediately by the falling-edge of a certain GPIO pin.
Without disabling interrupts, the communication fails occasionally, with sporadic delays of about 45 clock cycles. Disabling all interrupts by setting the I bit of the CPSR register fixes this problem entirely, making me think it's a interrupt problem... however, then my GPIO interrupt doesn't work, so this isn't a solution.
I've tried clearing all enable bits in the NVIC, except the one used for my GPIO interrupt, but the problem still occurs.
Are there any interrupts which aren't handled by the NVIC which might be causing the problem? Or does anyone have any other ideas? Any help or ideas would be much appreciated! Thanks.