PCAN-USB BUS-OFF when communicate with TCAN1042

This forum covers issues concerning multiple hardware products.
Locked
Evanee
Posts: 4
Joined: Tue 22. Sep 2020, 05:00

PCAN-USB BUS-OFF when communicate with TCAN1042

Post by Evanee » Tue 22. Sep 2020, 05:05

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
1.jpg (96.76 KiB) Viewed 3246 times
(2)TCAN send msg to PCAN works well, Pcan can receive the msg. Cycle time=50ms
2.jpg
2.jpg (100.72 KiB) Viewed 3246 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
3.png (22.04 KiB) Viewed 3246 times
4.png
4.png (8.6 KiB) Viewed 3246 times

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-USB BUS-OFF when communicate with TCAN1042

Post by M.Heidemann » Tue 22. Sep 2020, 12:14

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

Evanee
Posts: 4
Joined: Tue 22. Sep 2020, 05:00

Re: PCAN-USB BUS-OFF when communicate with TCAN1042

Post by Evanee » Tue 22. Sep 2020, 15:02

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...

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-USB BUS-OFF when communicate with TCAN1042

Post by M.Heidemann » Tue 22. Sep 2020, 15:16

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

Evanee
Posts: 4
Joined: Tue 22. Sep 2020, 05:00

Re: PCAN-USB BUS-OFF when communicate with TCAN1042

Post by Evanee » Tue 22. Sep 2020, 15:32

both size works well!
rr.JPG
rr.JPG (193.47 KiB) Viewed 3219 times
ww.png
ww.png (48.35 KiB) Viewed 3219 times

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-USB BUS-OFF when communicate with TCAN1042

Post by M.Heidemann » Tue 22. Sep 2020, 15:56

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
CustomBitrate1.PNG (1.83 KiB) Viewed 3217 times
CustomBitrate2.PNG
CustomBitrate2.PNG (20.21 KiB) Viewed 3216 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
customBitrate3.PNG (1.42 KiB) Viewed 3215 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
CustomBitrate4.PNG (51.39 KiB) Viewed 3217 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

Evanee
Posts: 4
Joined: Tue 22. Sep 2020, 05:00

Re: PCAN-USB BUS-OFF when communicate with TCAN1042

Post by Evanee » Tue 22. Sep 2020, 16:32

OOOoooo Thanks very much!! It works!!!

I changed my mcu setting as Pcan view

Thanks again!@!!
EE.png
EE.png (19.56 KiB) Viewed 3210 times
TTT.png
TTT.png (14.56 KiB) Viewed 3210 times
DD.png
DD.png (19.47 KiB) Viewed 3210 times

M.Heidemann
Sales & Support
Sales & Support
Posts: 673
Joined: Fri 20. Sep 2019, 13:31

Re: PCAN-USB BUS-OFF when communicate with TCAN1042

Post by M.Heidemann » Wed 23. Sep 2020, 08:03

Hello,

You`re welcome.

We are glad you could resolve the issue.

Best Regards

Marvin

- closed -

Locked