Skip to main content
ANguy.5
Associate II
March 23, 2021
Solved

SPC58EC-DISP Not success in enable physical CAN Output

  • March 23, 2021
  • 2 replies
  • 2022 views

Hello,

As title said, I am working on SPC58EC-DISP. I have tested the example code SPC58xx_RLA_CAN Test Application for Discovery and it works for External Loopback mode. Now I want to transmit and receive CAN data with another physical CAN device using No_Loopback mode for CAN1, but I'm yet to succeed in seeing any data with external device.

I have 2 external USB-CAN adapters that see each other data at matching baudrate. But none of them can see data from SPC58EC-DISP. Some of the things I have in my set-up:

  • I have 120 ohm resistor in the CAN wires.
  • I left the PIN setting from the example untouched which are using pin 119 (PIN_RX_1_0) and 118 (PIN_TX_1_0)
  • I tried to connect my USB-CAN adapter to the DB9 CAN1 connector on the SPC58EC-DISP as well as the CAN_1_H & CAN_1_L pin
  • TX Mode is DEDICATED, and TX Buffers is 32.
  • I give the loop 100ms delay between Transmitting

I can confirm that the CAN1 port send messages up to the 32 message buffer before it goes into CAN_MSG_WAIT state. My thinking is the physical CAN1 DB-9 and CAN_1_H & CAN_1_L pins are not actually activated to send data out.

Please recommend what I should do next? Is there anything else I should do to enable physical CAN pin out?

I read this and did not see anything mention about extra step to get the physical pins working besides switching to No_Loopback mode: https://www.st.com/resource/en/application_note/dm00662287-spc58ec-can-bus-configuration-stmicroelectronics.pdf

Thanks,

An Nguyen

    This topic has been closed for replies.
    Best answer by DCARR

    Hi Nguyen,

    I`ve checked the MCAN behavior on a brand new project in SPC5 and from my side it works fine in No_Loopback mode for CAN1. I`ve just changed the loopback mode leaving all the other settings equal to what is present in the original project. Maybe you have to check the discovery board jumpers settings. For this reason I attach a picture of my working board and you can check if the jumper settings on your board are right.

    Best regards

    Domenico

    2 replies

    ANguy.5
    ANguy.5Author
    Associate II
    March 24, 2021

    I checked further on the User Manual UM2259. The board came with jumper JP2 CAN_1_STBY & STBY. Moving the jumper to STBY & GND solved the issue, I could receive data with an external CAN device.

    DCARR
    DCARRBest answer
    Visitor II
    March 24, 2021

    Hi Nguyen,

    I`ve checked the MCAN behavior on a brand new project in SPC5 and from my side it works fine in No_Loopback mode for CAN1. I`ve just changed the loopback mode leaving all the other settings equal to what is present in the original project. Maybe you have to check the discovery board jumpers settings. For this reason I attach a picture of my working board and you can check if the jumper settings on your board are right.

    Best regards

    Domenico

    ANguy.5
    ANguy.5Author
    Associate II
    March 24, 2021

    Hi Domenico,

    Thank you. Indeed my issue has to do with the jumper JP2. Leaving setting same as your board worked for me.

    Before that, I also tried to remove the jumper. According to the User Manual, No Jumper on JP2 is "normal operation". What does that mean and why it didn't work?

    Regards,

    An