MCP2515 Interrupt #can


turboaffe@...
 

Hello everybody, this is my first post.
I have a problem with the drivers/can/can_mcp2515.c interrupt configuration/the mcp2515 driver implementation.
I would like to send a can message with the can_send function. On my board, a stm32 is connected to the mcp2515.
The message is sent, i see it on the bus via candump, and my logic analyzer shows a falling edge on the mcp2515 interrupt output as soon as the mcp2515 is done with sending.
The OS does not react on that falling edge, and my program is stuck on the blocking can_send function.
I discovered that the whole thing works if i change the interrupt edge configuration/gpio flags as follows in can_mcp2515.c, lines 860 to 862:

From: if (gpio_pin_interrupt_configure(dev_data->int_gpio, dev_cfg->int_pin, GPIO_INT_EDGE_TO_ACTIVE)) { return -EINVAL; }
To: if (gpio_pin_interrupt_configure(dev_data->int_gpio, dev_cfg->int_pin, GPIO_INT_EDGE_TO_INACTIVE)) { return -EINVAL; }

Can somebody point me to somebody who I could discuss this problem with? I am not sure if this is a bug or how it can work on the other boards, like the DF Robot CAN Shield one.

Thank you!

Join users@lists.zephyrproject.org to automatically receive all group messages.