Unable to communicate with MCP2515 CAN controller over SPI

Hi all.
I'm having issues communicating with MCP2515 over SPI.
I'm using SpeedStudio XIAO ESP32C3.
I was able to successfully setup CAN-BUS communication using the MCP2515 development board.

Next I decided to design a PCB, that would combine the functionality of that prototype board with the XIAO on one compact PCB.
I found schematics on this site supposedly for the development board I had success with.

I used it as a base for my PCB, which looks like below:


I used the QFN20 version of the MCP2515 and a bit different CAN driver (TJA1057 instead of TJA1050), as I couldn't find the latter in the HVSON8 form factor I wanted for my PCB.

My PCB looks like below:
FRONT:


BACK:

As it's my first PCB ever designed, it is possible, that I did make some errors. I ordered it in local PCB factory along with assembly so it came almost ready to go. Only needed to solder in the XIAO

Unfortunately, when I uploaded the same code, which worked well with the development board before, it didn't work on my PCB.

Using Oscilloscope I can see that the MCU sends data over SPI, but the MCP2515 never responds.

I can see 1 MHZ clock signal on SCK pin of the MCP2515, which suggests, that the MCP is alive (internal prescaller works).

I was wondering if that might be a voltage issue (ESP works on 3.3 V, and I power MCP2515 from 5V), but it didn't seem to be a problem for the development board.
Based on MCP2515 datasheet, minimum voltage for logical 1 on SPI pins is 0.7 x VDD, which is around 3.6 for 5.1 V VDD that I have. I tried lowering this VDD down to 4.5 V, which should bring the logical 1 down to 3.15 V, which is below what MCU provides at 3.3 V, but still no avail.
Again - on development board MCP is powered from 5V and communicates without issues with XIAO that works on 3.3 V.

I will capture some oscilloscope stills to show what happens in both cases, but I thought I'd post this first in case I'm missing something obvious.

Any suggestions highly appreciated :slight_smile:

I will take a SWAG and say you have the wrong transceiver the part you used is rated at VCC supply voltage 4.5 - 5.5 V. Change that and it should work great at 3V3. Listing the voltages on a schematic helps a lot.

Thanks for reply.
Will have the voltages in mind in future. In this case VCC = 5 V.

So, in my original post I wrote, that I did lower the supply voltage to 4.5 to check if that will help. Unfortunately that wasn't true. When capturing oscilloscope stills for this post I recalled, that I wanted to lower the supply voltage, but I run into an issue of needing USB connection for serial monitoring at the same time, and since USB also supplied power via XIAO, I couldn't lower the supply voltage below what USB was providing, and it was 5.2 V.

Now I rewrote the code to not need to serial monitor while testing, disconnected USB and connected lab PSU, and, low and behold, MCP2515 responded, when Supply voltage lowered just slightly below 5 V (4.98 V to be exact). As soon as I got it above 5.05, it stopped responding.

I still don't get it how the development board worked with +5V for supply. I'll need to check further, but for now my issue seems to be solved. I'll probably need to redo the PCB to work on 3.3 V , that also means different version pf TJA1057 that has additional pin for setting logic voltage. But well - that is what prototyping is about :slight_smile: