Skip to main content
Explorer II
December 14, 2023
Solved

STM32F411E-DISCO and MCP2515 INTERRUPT

  • December 14, 2023
  • 1 reply
  • 2363 views

Hello, by connecting an mcp2515 to Stm32, I enabled it to communicate properly with other cards via the Can network. However, when a message arrives, I couldn't understand how to receive it with the INT pin and I couldn't do it. I tried connecting the interrupt via EXTI by connecting the INT pin on the MCP2515 to GPIOA8. When I received the notification from here, I thought I could read the message on the CAN network and take action, but I was not successful. Can you help with this ?

 

I am using https://github.com/eziya/STM32_SPI_MCP2515 this library for MCP2515.

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    Try first to test EXTI function without MCP2515 with an external button or so. Refer to the example in STM32CubeF4 provided under the path Projects\STM32F411E-Discovery\Examples\GPIO\GPIO_EXTI\ don't forget to check the edge configuration (falling or rising) then if all is ok go forward with MCP2515 .

    1 reply

    Technical Moderator
    December 14, 2023

    Hello,

    To let the community members help you, you need to provide more details at least your source code and how do you manage the communication between mcp2515 and STM32 your schematics etc... and please describe the issue? you don't get any EXTI interrupt or what?

    sheqomAuthor
    Explorer II
    December 14, 2023

    https://deepbluembedded.com/stm32-external-interrupt-example-lab/

    I made like this example, I connect the INT pin of the MCP2515 on the relevant pin, but when any data arrives, the interrupt I set in this example is not triggered in any way.

    mƎALLEmAnswer
    Technical Moderator
    December 14, 2023

    Hello,

    Try first to test EXTI function without MCP2515 with an external button or so. Refer to the example in STM32CubeF4 provided under the path Projects\STM32F411E-Discovery\Examples\GPIO\GPIO_EXTI\ don't forget to check the edge configuration (falling or rising) then if all is ok go forward with MCP2515 .