Arduino UNO R3 with MCP2515 Shield doesn't send ACK

I am currently reading the 3-axis acceleration sensor GY61 with a Nucleo-F072RB and transmitting the values via CAN bus to an Arduino UNO R3 with MCP2515 CAN bus shield. The data is also received correctly by the Arduino, but it does not send an ACK bit, which means that the STM32 does not send any more messages. The arduino-mcp2525 lib is used with the following code:

#include <mcp2515.h>

struct can_frame canMsg;
MCP2515 mcp2515(10);


void setup() {
  Serial.begin(115200);

  mcp2515.reset();
  mcp2515.setBitrate(CAN_125KBPS, MCP_8MHZ);
  mcp2515.setNormalMode();

  Serial.println("------- CAN Read ----------");
  Serial.println("ID  DLC   DATA");
}

void loop() {
  if (mcp2515.readMessage(&canMsg) == MCP2515::ERROR_OK) {
    Serial.print(canMsg.can_id, HEX); // print ID
    Serial.print(" ");
    Serial.print(canMsg.can_dlc, HEX); // print DLC
    Serial.print(" ");

    for (int i = 0; i < canMsg.can_dlc; i++)  { // print the data
      Serial.print(canMsg.data[i], HEX);
      Serial.print(" ");
    }

    Serial.println();
  }
}

Schematic:


Logic Analyzer Screenshot:

Arduino Monitor Screenshot
Monitor_Screenshot

Check the return code from setNormalMode().

Where are the 120 ohm termination resistors?

One is connected to the CAN shield via jumper J3 and the other is integrated in the transceiver. I measured both with the multimeter.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.