Skip to main content
Explorer
March 4, 2024
Solved

CAN1 communication doesnt work on nucleo-l433rc-p

  • March 4, 2024
  • 3 replies
  • 2021 views

Hi I'm new in working with CAN-bus. My project involves two stm32 boards (both are nucleo-l433rc-p) and I want to get CAN-bus communication between them. The code is supposed to make a build in LED blink each time the blue button on the main nucleo board is pressed (although I would be happy to get any CAN communication at all).

Relevant code:

Main:

Mr4_0-1709590357897.png

Mr4_1-1709590366849.png

Mr4_2-1709590413932.png

Mr4_3-1709590425372.png

Relevant code secondary:

Mr4_4-1709590488526.png

Mr4_5-1709590496225.png

Mr4_6-1709590511682.png

Hardware:

Mr4_7-1709590528131.png

Mr4_8-1709590532961.jpeg

 

 

 

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    You need to connect STBY pin of the transceiver to the ground.

    Also becarefull about VIH min parameter: your MCU VDD = 3.3V while your transceiver is powered with 5V and it does not have VIO pin to adapt the voltage levels:

    SofLit_0-1709722439397.png

    From the transceiver's datasheet:

    SofLit_0-1709724509083.png

    VIO = VDD in your case.

    -> Tx VIH min = 5V x 0.7 = 3.5V which is > 3.3V!

    So you need a transceiver config with VIO pin (instead of SPLIT pin) or another transceiver having VIH min < 3.3V or simply a 3.3V transceiver.

     

     

    3 replies

    Graduate II
    March 5, 2024

    You haven't made clear what the issue is? Are you not getting an interrupt on the button press? Or that you know you're getting an interrupt on button pressed and you know you're sending a CAN message, but not receiving a CAN message on the 2nd board? Assuming you've used a scope to see actual CAN activity?

    Your images are so low resolution that you can't make anything out. Based off the drawing, that looks to be a TJA1049 CAN transceiver? Is the STB pin grounded on the TJA1049?

    I don't know if you have a ground reference to both boards? Are the two dev boards connected by USB to the same computer so they both have a ground reference to each other? 

    Mr4Author
    Explorer
    March 5, 2024

    I'm sorry for not giving enough information. At the moment I'm trying to just scope the CAN-signal using an oscilloscope. E.G. I don't think any CAN-signal is being sent out. The transceivers used are MCP2561 PDIP, SOIC. The STBY pin isn't used at all.

    Both boards are connected by USB to the same computer, so they do have a ground reference to each other.

    Thank you for your help.

     

    Graduate II
    March 6, 2024

    Hi,

    in the Datasheet is the "standy pin" pullup internal.

    You have to pulldoen the pin to GND.

    padawan_0-1709720329907.png

    hth

    padawan

    mƎALLEmAnswer
    Technical Moderator
    March 6, 2024

    Hello,

    You need to connect STBY pin of the transceiver to the ground.

    Also becarefull about VIH min parameter: your MCU VDD = 3.3V while your transceiver is powered with 5V and it does not have VIO pin to adapt the voltage levels:

    SofLit_0-1709722439397.png

    From the transceiver's datasheet:

    SofLit_0-1709724509083.png

    VIO = VDD in your case.

    -> Tx VIH min = 5V x 0.7 = 3.5V which is > 3.3V!

    So you need a transceiver config with VIO pin (instead of SPLIT pin) or another transceiver having VIH min < 3.3V or simply a 3.3V transceiver.