cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411E-DISCO and MCP2515 INTERRUPT

sheqom
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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 .

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
SofLit
ST Employee

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?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

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.

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 .

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

My bad... 

 

https://gist.github.com/pdp7/b80f386cf4b72dcbc9c10436e67d5eb1

 

I didn't know that I had to activate the MCP2515's interrupt mode. Thank you.