Skip to main content
hholms
Associate II
February 26, 2008
Question

Interrupt pending is not set when using SPI1

  • February 26, 2008
  • 2 replies
  • 736 views
Posted on February 26, 2008 at 10:51

Interrupt pending is not set when using SPI1

    This topic has been closed for replies.

    2 replies

    hholms
    hholmsAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 12:25

    Located the error.. Was using the wrong registers to enable and disable interrupt.. Was much easier to locate when I found a 4 channel scope..

    In order to disable interrupt I now use:

    NVIC->ICER[0] = 0xFFFFFFFF

    and to restore NVIC->ISER[0] = oldInterruptState

    That seems to solve my issue

    hholms
    hholmsAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 12:25

    Hi,

    I am having trouble with SPI1 and an external interrupt on PC6.

    I have configured a pin to generate an interrupt on Falling edge.

    This works fine until the Interrupt Falling edge collide with a SPI1 write/read (Which will happen from time to time) - When that happens my interrupt routine is not called, nor is the pending pit set.

    The SPI is unaffected, but the External Interrupt vector is not called.

    I have tried fooling around with different interrupt priorities, moving the external interrupt to another pin, disabling interrupt when entering the SPI function, but nothing seems to help.

    As far as I have been able to read. The pending bit should be set in all cases and when interrupts are enabled the pending interrupt should be executed?

    Any pointers or sample code that enable SPI & external interrupts will be greatly appriciated..

    Best Regards

    Henrik Holm

    Ps. I am using the ST-Firmware library to configure the STM32