PCAN USB goes to BUSOFF until UUT wakes up

USB to CAN Interface
Post Reply
radek.jez
Posts: 3
Joined: Mon 9. Jan 2017, 09:16

PCAN USB goes to BUSOFF until UUT wakes up

Post by radek.jez » Mon 9. Jan 2017, 09:53

Hello,

I am facing a little problem. We are producing tester for some car ECU (UUT) and the communication fails shortly after start. The situation is following:
- There are just two nodes PCAN USB and UUT
- UUT needs to receive "NHM message" periodically every 200ms to wake up and to stay alive
- wake-up time of UUT is around 100ms (CAN defines wakeup time at max 200ms, so there should be no problem)
- when I start sening NMH, the UUT does not ACK the message (waking up ~100ms), PCAN-USB repeats sending message at really high rate (approx 310us) and finally goes to BUSOFF (according CAN standard, within ~30ms)
- UUT finally become active, but without "NMH" it goes to sleep (PCAN is in BUSOFF)
- after a while PCAN returns from BUSOFF and tries to send NMH and because UUT is sleeping everything repeats

Can you give me advice, how to solve that behavior?
Is it possible to adjust repetition period on acknowledge error?
Do I need to quickly restart PCAN-USB when BUSSOF detected?
Or is it necessary to add another node into bus?
What solution is the most correct?

Thank you

Radek

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: PCAN USB goes to BUSOFF until UUT wakes up

Post by PEAK-Support » Mon 9. Jan 2017, 12:15

If you use your own Software (using the Software API PCAN-Basic) you could simply check the BUS Status and restart your CAN Instance when getting the Bus Error.

We also have implemented a "Auto BUSOFF Reset" - see manual of PCAN-Basic API
(Parameter PCAN_BUSOFF_AUTORESET ")
PCAN_BUSOFF_AUTORESET

Access:

Description: This parameter instructs the PCAN driver to reset automatically the CAN controller of a PCAN channel when a bus-off state is detected. Since no communication is possible on a bus-off state, it is useful to let the driver to catch this event automatically and reset the controller, avoiding extra handling of this problem in an end application.

Possible values: This parameter can have one of these values: PCAN_PARAMETER_OFF, PCAN_PARAMETER_ON. Note that other values will considered invalid.

Default value: Disabled (PCAN_PARAMETER_OFF).

PCAN-Device: All PCAN devices (excluding PCAN_NONEBUS channel).

REMARKS: Reseting the hardware has a duration of ~ 500 milliseconds. After receiving the PCAN_ERROR_BUSOFF error, an application should wait that time before trying to read or write again.
But best choice is if no error was generated because of the missing ACK of the non actice CAN Controller of the ECU. So a 3rd active CAN Node will solve this problem in the easy and best way.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

radek.jez
Posts: 3
Joined: Mon 9. Jan 2017, 09:16

Re: PCAN USB goes to BUSOFF until UUT wakes up

Post by radek.jez » Thu 12. Jan 2017, 10:12

Adding 3rd device is quite complicated, 500ms autoreset is too slow, but checking BUS status seems to be suitable solution :) Thank you for support.

Radek

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: PCAN USB goes to BUSOFF until UUT wakes up

Post by PEAK-Support » Thu 12. Jan 2017, 11:08

use a PCI or PCIe based solution - then the Reset is less than 1ms - keep in mind - you talk a bout a CAN-USB System which is a nearly "stand alone" Device that communicate via USB. Using a real memory mapped fast PCI(e) card, you will never run in such problems. Also our ExpressCards for Laptops are PCIe based (not USB based as other LOW Cost Adapters)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply