RP2040 pico CAN-BUS ACAN2515.h-library how to change from loopBackMode to normal mode?

Hi everybody,

in my actual project I want to use two RaspBerry Pi pico for CAN-BUS-communication by using the MCP2515-CAN-BUS-module.

I tested the MCP2515-CAN-BUS-modules successfully with two Arduino Unos. The communication worked even with CAN-LOW shortcutted to ground.

I found a demo-code for RaspBerry Pi Pico in the examples
File - examples - examples from custom libraries - ACAN2515 - LoopBasicDemoRaspBerryPiPico

testing loopback Mode

I tested this democode in loopbackmode. The demo-code works as long as all connections to the MCP2515-module are correct.

I disconnected the interrupt-wire which resulted in receiving failed
After sending 16 frames sending failed

With reconnecting the interrupt-wire everything worked OK again

So as the next step I changed from

  settings.mRequestedMode = ACAN2515Settings::LoopBackMode;// Select loopback mode

to

settings.mRequestedMode = ACAN2515Settings::NormalMode;

I made some minor changes through

  • adding some serial printing
  • a heartbeat led,
  • printing filename date time
  • and use and my personal version of non-blocking timing

The CAN-BUS-specific code is exactly the same.

The MCP2515-module

has aquartz with "8.000M" marked on it. Ususally this is the frequency in MHz.
So I adapted this line

static const uint32_t QUARTZ_FREQUENCY = 8UL * 1000UL * 1000UL; // 8 MHz

from 20UL to 8UL

and this line to normalMode

  //settings.mRequestedMode = ACAN2515Settings::LoopBackMode;// Select loopback mode
  settings.mRequestedMode = ACAN2515Settings::NormalMode;
  const uint16_t errorCode = can.begin (settings, [ ] { can.isr (); });

As the MCP2515 works with voltages between 2.7V and 5.5V I assume that supplying the module with the 3.3V pin of the pico works

I even tested with the CAN-BUS with two arduino unos supplying the MCP2515-modules with only 3.3V which worked too.

The CAN-BUS-signal with Unos looks pretty good on the oscilloscope


But the CAN-BUS-signal looks weird when I connect one MCP2515-module to the Pico

What do you think ? What do I have to change in the code to make it work?

Does anybody have a Demo-Code that does not only work in loopBack-Mode but in
real transmitting mode?

best regards Stefan

oops forgot to post the code running on the RP2040 pico

//  ACAN2515 Demo in LoopBackMode mode, for the Raspberry Pi Pico
//  based on a code from Duncan Greenwood

#ifndef ARDUINO_ARCH_RP2040
#error "Select a Raspberry Pi Pico board"
#endif

#include <ACAN2515.h>

unsigned long MyTestTimer = 0;  // Timer-variables MUST be of type unsigned long
const byte    OnBoard_LED = 25; // onboard-LED Raspberry Pi pico

// The Pico has two SPI peripherals, SPI-0 and SPI-1. Either (or both) can be used.
// The are no default pin assignments so they must be set explicitly.

// According to the RP2040 data sheet, section 1.4.3 ”GPIO Functions” page 13, 
// you have the following choices for SPI pins:
// SPI-0_SCK            IO-Pins: 2, 6, 18, 22
// SPI-0_MOSI (SPI0 TX) IO-Pins: 3, 7, 19, 23
// SPI-0_MISO (SPI0 RX) IO-Pins: 0, 4, 16, 20
// SPI-0 CS             IO-Pins: 1, 5, 17, 21
  
// SPI-1_SCK            IO-Pins: 10, 14, 26
// SPI-1_MOSI (SPI1 TX) IO-Pins: 11, 15, 27
// SPI-1_MISO (SPI1 RX) IO-Pins:  8, 12, 24, 28
// SPI-1_CS             IO-Pins:  9, 13, 25, 29
  
// Testing was done with Earle Philhower's arduino-pico core:
// https://github.com/earlephilhower/arduino-pico

// SPI-Interface Pin-abbreviations
// SCK, SCLK, CLK, SCL
// MO_SI, (Master sends Data Out)   SDO, DO, DOUT
// MI_SO, (Master receives Data In) SDI, DI, DIN, SI

static const byte MCP2515_INT  = 1; // INT output of MCP2515 (adapt to your design)

static const byte MCP2515_SCK  = 2; // connected to  SCK input  of MCP2515
static const byte MCP2515_MOSI = 3; // master out is SI  input  of MCP2515
static const byte MCP2515_MISO = 4; // master in  is SO  output of MCP2515
static const byte MCP2515_CS   = 5; // CS input of MCP2515 (adapt to your design)


//  MCP2515 Driver object
ACAN2515 can (MCP2515_CS, SPI, MCP2515_INT);

//  MCP2515 Quartz: adapt to your design look on the housing of the quarzt
// if there is printed for example 8.000 this means 8 MHz = 8UL * 1000UL * 1000UL
static const uint32_t QUARTZ_FREQUENCY = 8UL * 1000UL * 1000UL; // 8 MHz

void setup () {
  pinMode(OnBoard_LED, OUTPUT);
  Serial.begin (115200);
  while (!Serial) {
    delay (50);
    digitalWrite (LED_BUILTIN, !digitalRead (LED_BUILTIN));
  }
  Serial.println("Setup-Start");
  PrintFileNameDateTime();

  // There are no default SPI pins so they must be explicitly assigned
  // ATTENTION ! Make sure to only assign IO-pins that can be used
  // According to the RP2040 data sheet, section 1.4.3 ”GPIO Functions” page 13, 
  SPI.setSCK(MCP2515_SCK);
  SPI.setTX(MCP2515_MOSI);
  SPI.setRX(MCP2515_MISO);
  SPI.setCS(MCP2515_CS);
  SPI.begin();
  Serial.println("SPI.begin();; done");

  Serial.println ("Configuring ACAN2515");
  //ACAN2515Settings settings (QUARTZ_FREQUENCY, 125UL * 1000UL);// CAN bit rate 125 kb/s
  ACAN2515Settings settings (QUARTZ_FREQUENCY, 500UL * 1000UL);// CAN bit rate 500 kb/s
  //settings.mRequestedMode = ACAN2515Settings::LoopBackMode;// Select loopback mode
  settings.mRequestedMode = ACAN2515Settings::NormalMode;
  const uint16_t errorCode = can.begin (settings, [] { can.isr (); });

  if (errorCode == 0) {
    Serial.print ("Bit Rate prescaler: ");
    Serial.println (settings.mBitRatePrescaler);
    Serial.print ("Propagation Segment: ");
    Serial.println (settings.mPropagationSegment);
    Serial.print ("Phase segment 1: ");
    Serial.println (settings.mPhaseSegment1);
    Serial.print ("Phase segment 2: ");
    Serial.println (settings.mPhaseSegment2);
    Serial.print ("SJW: ");
    Serial.println (settings.mSJW);
    Serial.print ("Triple Sampling: ");
    Serial.println (settings.mTripleSampling ? "yes" : "no");
    Serial.print ("Actual bit rate: ");
    Serial.print (settings.actualBitRate ());
    Serial.println (" bit/s");
    Serial.print ("Exact bit rate ? ");
    Serial.println (settings.exactBitRate () ? "yes" : "no");
    Serial.print ("Sample point: ");
    Serial.print (settings.samplePointFromBitStart ());
    Serial.println ("%");
  }
  else {
    Serial.print ("Configuration error 0x");
    Serial.println (errorCode, HEX);
  }
}

static uint32_t gBlinkLedDate = 0;
static uint32_t gReceivedFrameCount = 0;
static uint32_t gSentFrameCount = 0;

void loop () {
  CANMessage frame;

  //BlinkHeartBeatLED(OnBoard_LED, 250);

  if ( TimePeriodIsOver(MyTestTimer, 500) ) {
    bool ok = can.tryToSend (frame);

    if (ok) {
      gSentFrameCount += 1;
      Serial.print ("Sent: ");
      Serial.println (gSentFrameCount);
    }
    else {
      Serial.println ("Send failure");
    }
  }


  if (can.available ()) {
    can.receive (frame);
    gReceivedFrameCount ++;
    Serial.print ("Received: ");
    Serial.println (gReceivedFrameCount);
  }
}

// helper-functions
void PrintFileNameDateTime() {
  Serial.println("Code running comes from file ");
  Serial.println(__FILE__);
  Serial.print("  compiled ");
  Serial.print(__DATE__);
  Serial.print(" ");
  Serial.println(__TIME__);
}


// easy to use helper-function for non-blocking timing
boolean TimePeriodIsOver (unsigned long &startOfPeriod, unsigned long TimePeriod) {
  unsigned long currentMillis  = millis();
  if ( currentMillis - startOfPeriod >= TimePeriod ) {
    // more time than TimePeriod has elapsed since last time if-condition was true
    startOfPeriod = currentMillis; // a new period starts right here so set new starttime
    return true;
  }
  else return false;            // actual TimePeriod is NOT yet over
}



void BlinkHeartBeatLED(int IO_Pin, int BlinkPeriod) {
  static unsigned long MyBlinkTimer;
  //pinMode(IO_Pin, OUTPUT);

  if ( TimePeriodIsOver(MyBlinkTimer, BlinkPeriod) ) {
    digitalWrite(IO_Pin, !digitalRead(IO_Pin) );
  }
}

Maybe I'm crosseyed today but shouldn't this be using RP2040 GPIO numbers and not MCP2525 PIN numbers.



  // There are no default SPI pins so they must be explicitly assigned
  // ATTENTION ! Make sure to only assign IO-pins that can be used
  // According to the RP2040 data sheet, section 1.4.3 ”GPIO Functions” page 13, 
  SPI.setSCK(MCP2515_SCK);
  SPI.setTX(MCP2515_MOSI);
  SPI.setRX(MCP2515_MISO);
  SPI.setCS(MCP2515_CS);
  SPI.begin();
  Serial.println("SPI.begin();; done");

the constants are defined in the sketch.
They do not come from the MCP2515-library

To a certain extent this might be confusing. I have connected the MCP2515-pins to the pin-numbers on the RP2040 pico.

The names come from the Demo-Code on which my code is based on.

I guess the logic behind it is
This code runs on the pico so pin-numbers belong to the pico
and they are connected from pico to a MCP2515
hence the name MCP2515.....

best regards Stefan

Okay I see they do correspond to the GPIO numbers for SPI0 on the Pico.

Data sheet for the TJA1050 driver lists the minimum voltage as 4.75v.

the following program transmits and receives CAN message using a RP2040 RPi Pico and MCP2515 CAN module

// RP2040 RPi Pico CAN Receive Example - note added INPUT_PULLUP to CAN0_INT
//
// RP2040 RPi PICO connections
// MCP2515 INT to RP2040 GP20
// MCP2515 SCK to RP2040 GP18 SPI0_SCK
// MCP2515  SI to RP2040 GP19 SPI0_TX
// MCP2515  SO to RP2040 GP16 SPI0_RX
// MCP2515  CS to RP2040 GP17 SPI0_CSn
// MCP2515 GND to RP2040 GND
// MCP2515 VCC to RP2040 GP 3.3V

#include <mcp_can.h>
#include <SPI.h>

long unsigned int rxId;
unsigned char len = 0;
unsigned char rxBuf[8];
char msgString[128];  // Array to store serial string

#define CAN0_INT 20  // for RP2040
MCP_CAN CAN0(17);   // 

void setup() {
  Serial.begin(115200);
  delay(2000);
  Serial.println("\n\nRP2040 CAN MCP2515 shield Send/Receive test - MCP2515 Initialize");
  // Initialize MCP2515 baudrate of 250kb/s and the masks and filters disabled.
  //  check crystal frequency!! e.g. Canbus shield is 16MHz MCP2515 is 8MHz
  if (CAN0.begin(MCP_ANY, CAN_250KBPS, MCP_8MHZ) == CAN_OK)
    Serial.println("CAN Receive - MCP2515 Initialized Successfully!");
  else
    Serial.println("Error Initializing MCP2515...");
  CAN0.setMode(MCP_NORMAL);         // Set operation mode to normal so the MCP2515 sends acks to received data.
  pinMode(CAN0_INT, INPUT_PULLUP);  // Configuring pin for /INT input *** added PULLUP ***
  Serial.println("MCP2515 Library CAN Send/Receive Example\n enter space to send a frame");
}

void loop() {
  // check for data received
  if (!digitalRead(CAN0_INT))  // If CAN0_INT pin is low, read receive buffer
  {
    CAN0.readMsgBuf(&rxId, &len, rxBuf);    // Read data: len = data length, buf = data byte(s)
    if ((rxId & 0x80000000) == 0x80000000)  // Determine if ID is standard (11 bits) or extended (29 bits)
      sprintf(msgString, "Extended ID: 0x%.8lX  DLC: %1d  Data:", (rxId & 0x1FFFFFFF), len);
    else
      sprintf(msgString, "Standard ID: 0x%.3lX       DLC: %1d  Data:", rxId, len);
    Serial.print(msgString);
    if ((rxId & 0x40000000) == 0x40000000) {  // Determine if message is a remote request frame.
      sprintf(msgString, " REMOTE REQUEST FRAME");
      Serial.print(msgString);
    } else {
      for (byte i = 0; i < len; i++) {
        sprintf(msgString, " 0x%.2X", rxBuf[i]);
        Serial.print(msgString);
      }
    }
    Serial.println();
  }
  // transmit data when space entered on keyboard
  if(Serial.available()){
    if (Serial.read() != ' ') return;
    static byte data[8] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 };
       for (byte i = 0; i < 8; i++) {
        sprintf(msgString, " 0x%.2X", data[i]);
        Serial.print(msgString);
      }
 
    // send data:  ID = 0x100, Standard CAN Frame, Data length = 8 bytes, 'data' = array of data bytes to send
    byte sndStat = CAN0.sendMsgBuf(0x100, 0, 8, data);
    if (sndStat == CAN_OK) {
      Serial.println(" Message Sent Successfully!");
    } else {
      Serial.println(" Error Sending Message...");
    }
    data[0]++;    // increment first byte of data
 }
}

serial monitor output

RP2040 CAN MCP2515 shield Send/Receive test - MCP2515 Initialize
Entering Configuration Mode Successful!
Setting Baudrate Successful!
CAN Receive - MCP2515 Initialized Successfully!
MCP2515 Library CAN Send/Receive Example
 enter space to send a frame
 0x03 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x04 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x05 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
Standard ID: 0x100       DLC: 8  Data: 0x0D 0x01 0x02 0x03 0x04 0x05 0x06 0x07
Standard ID: 0x100       DLC: 8  Data: 0x0E 0x01 0x02 0x03 0x04 0x05 0x06 0x07
Standard ID: 0x100       DLC: 8  Data: 0x0F 0x01 0x02 0x03 0x04 0x05 0x06 0x07
Standard ID: 0x100       DLC: 8  Data: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Standard ID: 0x100       DLC: 8  Data: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
 0x06 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x07 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x08 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x09 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x0A 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
Standard ID: 0x555       DLC: 8  Data: 0x44 0x44 0x00 0x00 0x00 0x00 0x00 0x00
Standard ID: 0x555       DLC: 8  Data: 0x44 0x44 0x00 0x00 0x00 0x00 0x00 0x00
 0x0B 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
Extended ID: 0x00555777  DLC: 8  Data: 0x44 0x44 0x99 0x99 0x99 0x90 0x00 0x00
Extended ID: 0x00555777  DLC: 0  Data: REMOTE REQUEST FRAM

Hi @horace ,

thank you very much for posting this demo-code.

If I run your code on my MCP2515-board with Vcc of the MCP2515-board connected to 3.3V
I get this in the serial monitor

11:05:47.668 -> 
11:05:47.668 -> 
11:05:47.668 -> RP2040 CAN MCP2515 shield Send/Receive test - MCP2515 Initialize
11:05:47.702 -> Entering Configuration Mode Successful!
11:05:47.702 -> Setting Baudrate Successful!
11:05:47.702 -> CAN Receive - MCP2515 Initialized Successfully!
11:05:47.702 -> MCP2515 Library CAN Send/Receive Example
11:05:47.702 ->  enter space to send a frame
11:05:56.792 ->  0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=7
11:05:58.948 ->  0x01 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=7
11:05:59.886 ->  0x02 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=7
11:06:00.730 ->  0x03 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=6
11:06:01.948 ->  0x04 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=6
11:06:02.933 ->  0x05 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=6
11:06:04.011 ->  0x06 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=6
11:06:05.886 ->  0x07 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message sndStat=6

On my MCP2515 the CAN-tranceiver-chip is a NXP TJA1050-chip.
As user @mikb55 has already mentioned the TJA1050 needs a minimum supply-voltage of 4.75V

I have read that the RP2040 is not 5V-tolerant.
I disconnected the MCP2515-board from the pico supplied the MCP2515-board with 5V and measured voltages on the Pins.
The interrupt-pin had 5V. So it is no option to supply the board with 5V.

What is strange is that with an Arduino Uno and the MCP2515-board supplied with 3.3V everything works as you can see in this picture of the DSO
image

If the MCP2515-board is completely DIS-connected the code reports
0x03 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!

Well if the MCP2515 is completely DIS-connected how can this be?
It seems that the error-checking of the library is rather poor.

Can you post a link / datasheet to that CAN-BUS-board that you are using?

best regards Stefan

I have two MCP2515 modules
one labeled HW-184 works OK with the RP2040 pico and a ESP32 both VCC to 3.3V

with RP2040 and ESP32 the other MCP2515 module works with loopback test and iinitialises OK at 3.3V but the send/receive test of post 7 indicates errors sending messages and does not receive

ESP32 CAN MCP2515 shield Send/Receive test - MCP2515 Initialize
Entering Configuration Mode Successful!
Setting Baudrate Successful!
CAN Receive - MCP2515 Initialized Successfully!
MCP2515 Library CAN Send/Receive Example
 enter space to send a frame
 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message...
 0x01 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message...
 0x02 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Error Sending Message...

if using the ESP32 I power the MCP2525 VCC from 5V the send/receive test then works OK

ESP32 CAN MCP2515 shield Send/Receive test - MCP2515 Initialize
Entering Configuration Mode Successful!
Setting Baudrate Successful!
CAN Receive - MCP2515 Initialized Successfully!
MCP2515 Library CAN Send/Receive Example
 enter space to send a frame
 0x01 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x02 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x03 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x04 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x05 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
 0x06 0x01 0x02 0x03 0x04 0x05 0x06 0x07 Message Sent Successfully!
Standard ID: 0x066       DLC: 8  Data: 0x44 0x44 0x44 0x99 0x99 0xAA 0xAA 0x00
Standard ID: 0x066       DLC: 8  Data: 0x44 0x44 0x44 0x99 0x99 0xAA 0xAA 0x00
Standard ID: 0x066       DLC: 8  Data: 0x44 0x44 0x44 0x99 0x99 0xAA 0xAA 0x00
Standard ID: 0x066       DLC: 8  Data: 0x44 0x44 0x44 0x99 0x99 0xAA 0xAA 0x00
Standard ID: 0x066       DLC: 8  Data: 0x44 0x44 0x44 0x99 0x99 0xAA 0xAA 0x00

photo of MCP2515 which works at 5V connected to ESP32

I would not try powering the MCP2515 from 5V when using a RP2040 RPi Pico unless I used a level shifter to connect the module
probably simpler to get a MCP2515 which works at 3.3V

with all these problems I will not use the RP2040 in this CAN-BUS-Project.

Maybe if somebody has developped a CAN-engine that makes use of the PIO-feature of the RP2040 so only a CAN-tranceiver like the Adafruit CAN Pal - CAN Bus Transceiver - TJA1051T/3 with inbuild dual-voltage-levels 3V/5V

can be used I try again.

For now I will test the Adafruit CAN Pal - CAN Bus Transceiver - TJA1051T/3
with an ESP32S3 if this works.

looks interesting! will have to get one
I see there is ESP32-TWAI-CAN library
let us know how you get on

Well this library has a singular example OBD2-querry.ino
The comment says

// Simple sketch that querries OBD2 over CAN for coolant temperature
// Showcasing simple use of ESP32-TWAI-CAN library driver.

which means the example-code is limited to OBD2, coolant-temperature
:roll_eyes: :grimacing: :woozy_face: :confused: :slightly_frowning_face: :frowning_face: :worried: :persevere: :confounded: :weary: :tired_face: :triumph: :rage: :face_with_symbols_over_mouth:

My work on this CAN-BUS-project changed to use a ESP32-S3 with a canbus tranceiver instead of a RP2040.

I started an introductional tutorial for the ESP32-S3 with using CAN-BUS here

best regards Stefan

Could you please share the physical hardware connections? I saw a couple posts on other forums where MCP2515 was modified to isolate the transceiver and provide it with 5V.

I did not isolate my MCP2515.

Anyway I changed to using an ESP32S3 with a different-tranceiverchip

Post 7 gives the connections and RP2040 program I used with a MCP2515

an RP20040 alternative is the CAN2040 project which is a software implementation for the RP2040 using a cjmcu-1051 CAN transciver

I ran File>Examples>ACAN2040>ACAN2040_test_v1 with connections

// RPi pico RP2040 GND    cjmcu-1051 GND
// RPi pico RP2040 VBUS   cjmcu-1051 VCC powers transciver
// RPi pico RP2040 3.3V   cjmcu-1051 VIO powers logic
// RPi pico RP2040 GP1    cjmcu-1051 CTX
// RPi pico RP2040 GP2    cjmcu-1051 CRX
// RPi pico RP2040 GND    cjmcu-1051 S   HIGH = TRX off, LOW = TRX on

serial monitor output

ACAN2040 test, bitrate = 250000 kbps, syscl = 133000000 mhz
starting CAN bus
setup complete, free memory = 251384 bytes

type 's' to send a test message
type 't' to stop CAN
type 'b' to restart CAN
type 't' for CAN statistics

sending message: [ 12345 ] [ 8 ] [ 90 91 92 93 94 95 96 97  ]  ... ok
sending message: [ 12345 ] [ 8 ] [ 90 91 92 93 94 95 96 97  ]  ... ok
rx_total = 0, tx_total = 0, tx_attempt = 1, parse_error = 0
cb: notify event type = 1048576
cb: message received
received msg: [ 256 ] [ 8 ] [ 7 77 69 71 65 0 7 8  ] 
cb: notify event type = 1048576
cb: message received
received msg: [ 256 ] [ 8 ] [ 8 77 69 71 65 0 7 8  ] 
sending message: [ 12345 ] [ 8 ] [ 90 91 92 93 94 95 96 97  ]  ... ok
cb: notify event type = 2097152
cb: message sent ok
sending message: [ 12345 ] [ 8 ] [ 90 91 92 93 94 95 96 97  ]  ... ok
cb: notify event type = 2097152
cb: message sent ok
received msg: [ 181 ] [ 8 ] [ 119 118 102 102 102 102 102 102  ] 
received msg: [ 2337835144 ] [ 8 ] [ 119 118 102 102 102 102 102 102  ] X
cb: notify event type = 1048576
cb: message received
received msg: [ 256 ] [ 8 ] [ 9 77 69 71 65 0 7 8  ] 
received msg: [ 256 ] [ 8 ] [ 10 77 69 71 65 0 7 8  ] 

maybe simpler to get a adafruit-rp2040-can-bus-feather all the modules on a single PCB

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