2021-03-23 03:05 AM
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 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
Solved! Go to Solution.
2021-03-24 01:41 AM
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
2021-03-23 11:07 PM
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.
2021-03-24 01:41 AM
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
2021-03-24 02:27 AM
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