Skip to main content
Paolo Andreuzza
Associate III
July 2, 2018
Solved

External interrupt and SPI clock on same pin. Is it possible?

  • July 2, 2018
  • 2 replies
  • 1034 views
Posted on July 02, 2018 at 12:14

Hallo.

I'm developing an application, using a STM32L433.

My device is a SPI Slave that receive, every a fixed amount of time, a 4 bytes long frame on SPI3 port.

Since I need a time syncronization with the SPI master, my idea was to enable an external interrupt (EXTI) on the SPI clock pin, to manage a kind of time stamp, leaving the SPI fifo receiving the four bytes.

When I was in the 'timestamp' interrupt routine I would have disabled the EXTI interrupt.

At the end of processing the four bytes received by the SPI RX FIFO, I would have enable again the external interrupt in the SPI Clock pin.

The question is: is it possible that a pin used as SPI Clock, as slave (so the pin, in this case, is an input), triggers even an external interrupt?

Thank you in advance.

Paolo

    This topic has been closed for replies.
    Best answer by waclawek.jan
    Posted on July 02, 2018 at 12:25

    Yes, EXTI is independent of other functionality of the pin (as long as it's used as digital, i.e. not analog).

    JW

    2 replies

    waclawek.jan
    waclawek.janBest answer
    Super User
    July 2, 2018
    Posted on July 02, 2018 at 12:25

    Yes, EXTI is independent of other functionality of the pin (as long as it's used as digital, i.e. not analog).

    JW

    Paolo Andreuzza
    Associate III
    July 2, 2018
    Posted on July 02, 2018 at 17:29

    It works, thank you!

    Paolo