Page 1 of 1
PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Tue 22. Sep 2020, 05:05
by Evanee
I use TCAN1042DRQ1(TI) chip to communicate with PCAN-USB
(1)PCAN send msg to TCAN works well, Tcan can rececive the msg. Cycle time=50ms

- 1.jpg (96.76 KiB) Viewed 9731 times
(2)TCAN send msg to PCAN works well, Pcan can receive the msg. Cycle time=50ms

- 2.jpg (100.72 KiB) Viewed 9731 times
(3)PCAN send msg to TCAN and TCAN send msg to PCAN , At first,PCAN view receive the msg but shows Busheavy and several seconds later BUS-OFF. TCAN can receive messages from PCAN before PCAN BUS-OFF
The scope picture will alternately form (1) to(2)to(1)to(2)……
And when use pcan basic-api c# program, receive STATUS 0x00 00 00 10

- 3.png (22.04 KiB) Viewed 9731 times

- 4.png (8.6 KiB) Viewed 9731 times
Re: PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Tue 22. Sep 2020, 12:14
by M.Heidemann
Hello,
This is possibly a bitrate mismatch,
please check the bit-timings of both your CAN-Nodes (PCAN-USB, TCAN1042) and see if
they match.
Please report back to me if this resolved the issue.
Best Regards
Marvin
Re: PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Tue 22. Sep 2020, 15:02
by Evanee
Many thanks !
bitrate is right,125k
I do the test again
and
Tcan can send msg to Pcan--->Pcan can receive
Pcan can send msg to Tcan<--Tcan can receive
but
when two sides send msgs together, bus-off occurrrrrrrr
a bit more
I have two Pcan-USB
one shows bus-heavy and seconds later bus-off.
the other shows bus-heavy and seconds later bus-off and seconds later bus-heavy...bus-off...bus-heavy....bus-off...bus-heavy...
Re: PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Tue 22. Sep 2020, 15:16
by M.Heidemann
Hello,
Can you please test the following, so we can assess the issue further?
Use both your PCAN-USBs with PCAN-View at 125k and connect them to each other,
make sure to use either terminated cable or a termination of 120 Ohms on both Bus-ends.
Can you establish a communication between your PCAN-USBs using this method?
Please report back to me with your findings.
Best Regards
Marvin
Re: PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Tue 22. Sep 2020, 15:32
by Evanee
both size works well!

- rr.JPG (193.47 KiB) Viewed 9704 times

- ww.png (48.35 KiB) Viewed 9704 times
Re: PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Tue 22. Sep 2020, 15:56
by M.Heidemann
Hi,
Thank you for your quick reply.
So, we did establish that the communication of the PCAN-USB itself works.
The Bitrate still seems to be the issue here.
There is more to CAN-Timing than the resulting speed (125Kbit/s). Most likely
the 125Kbit/s CAN-Timing of your TCAN1042 does not match the 125Kbit/s CAN-Timing of your Application (This could be due to the used clock-frequency, the setting of Tseg1, Tseg2, BRP and SamplePoint).
Please do the following:
Please check the documentation of your TCAN1042 for the exact CAN-Timing used at 125Kbit/s.
Once you have aquired this information you can create a custom Bitrate in PCAN-View:

- CustomBitrate1.PNG (1.83 KiB) Viewed 9702 times

- CustomBitrate2.PNG (20.21 KiB) Viewed 9701 times
And test communication between PCAN-View (Using PCAN-USB) and the TCAN1042 with that custom Bitrate.
Please note the resulting register-value, you can use it to add another possible bitrate to PCAN-basic in the next step.

- customBitrate3.PNG (1.42 KiB) Viewed 9700 times
Open up your PCANBasic-header file (you'll find it in the "include"-folder of the PCANBasic Package, see where your included header file is located):

- CustomBitrate4.PNG (51.39 KiB) Viewed 9702 times
And add your custom Bitrate in the header file.
In your PCANBasic applications, make sure that you use the new custom bitrate instead of the current one.
Best Regards
Marvin
Re: PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Tue 22. Sep 2020, 16:32
by Evanee
OOOoooo Thanks very much!! It works!!!
I changed my mcu setting as Pcan view
Thanks again!@!!

- EE.png (19.56 KiB) Viewed 9695 times

- TTT.png (14.56 KiB) Viewed 9695 times

- DD.png (19.47 KiB) Viewed 9695 times
Re: PCAN-USB BUS-OFF when communicate with TCAN1042
Posted: Wed 23. Sep 2020, 08:03
by M.Heidemann
Hello,
You`re welcome.
We are glad you could resolve the issue.
Best Regards
Marvin
- closed -