PCAN-USB Pro Error Generator

High-speed USB 2.0 to CAN/LIN Interface
Post Reply
seanb
Posts: 2
Joined: Mon 2. Jun 2014, 16:43

PCAN-USB Pro Error Generator

Post by seanb » Mon 2. Jun 2014, 17:28

Hello,

I am using the PCAN-USB Pro to introduce bus errors to test the response of my system and I have a few questions.

What exactly does the adapter do to destroy a frame at a given bit position, generate an error frame starting at that bit position? If I generate an error at each bit position, walking through the message from bit 1 to N, I was expecting to see the error frame move corresponding to the bit position but this doesn't seem to be the case.

Is bit position before or after bit stuffing? It seems to be before bit stuffing.

Thanks,
Sean

G.Bohlen
Hardware Development
Hardware Development
Posts: 62
Joined: Wed 22. Sep 2010, 21:38

Re: PCAN-USB Pro Error Generator

Post by G.Bohlen » Tue 3. Jun 2014, 17:17

Hello,
PCAN-USB pro starts to produce an error-frame (6 dominant bits) at the given bit-position.
But the bit position where a CAN-Error is detected by other nodes may vary.

The TRANSMITTER of the message will see an error as soon as it tries to send a recessive level that is owerwritten by the dominant level of the error frame. This may take up to 5 bittimes. (in case the transmitter wants to send 5 dominant bits there is no error-frame visible on the bus until the 6th bit is dominant - at the 6th position a stuff-but with recessive level is expected)

Any RECEIVER will detect an error-frame as soon as 6 dominant bits are received. This may be the case after 1 bittime (previous 5 bits were already dominant, first bit of error-frame overrides the recessive stuff-bit), and can take up to 6 bittimes (previous bit was recessive, stuff-error is detected after max. 6 bittimes)

Regards,
Gunnar Bohlen

seanb
Posts: 2
Joined: Mon 2. Jun 2014, 16:43

Re: PCAN-USB Pro Error Generator

Post by seanb » Tue 3. Jun 2014, 19:37

Hello Gunnar,

Thanks for the quick reply.

Is Bit Position under Destroy Multiple Frames the bit position prior to bit stuffing?

I read in the manual that Destroy Multiple Frames only works on receive messages. Does this mean that you can inject error frames on transmit messages sent from PCAN-View but you must do this using the Destroy Single Frame mechanism?

Regards,
Sean

G.Bohlen
Hardware Development
Hardware Development
Posts: 62
Joined: Wed 22. Sep 2010, 21:38

Re: PCAN-USB Pro Error Generator

Post by G.Bohlen » Fri 6. Jun 2014, 09:50

Hello Sean,

the Bit-Position includes the stuff-bits, it is the position of the raw can frame that is transmitted on the physical lines.
If you want to destroy a transmit frame you can only use the single frame mechanism.

You could connect both CAN-channels of PCAN-USB pro and use the second CAN-channel to destroy multiple CAN-frames that you send on CAN-channel 1.

One more difference between "destroy single frame" and "destroy multiple frames":
The option "destroy multiple frames" needs a CAN-identifier. Therefor this works only once the arbitration phase is completed (CAN identifier completely transmitted on the bus). A bit-position within the arbitration field would not result in a destroyed CAN-message.
"Destroy single frame" destroys the next frame on the bus, either transmit or receive. The bit position can be any position within the complete frame (including arbitration field).

Regards,
Gunnar Bohlen

hareeshj
Posts: 9
Joined: Thu 6. Dec 2018, 18:23

Re: PCAN-USB Pro Error Generator

Post by hareeshj » Sat 2. Nov 2019, 21:41

Is the SOF bit included in the count?

G.Bohlen
Hardware Development
Hardware Development
Posts: 62
Joined: Wed 22. Sep 2010, 21:38

Re: PCAN-USB Pro Error Generator

Post by G.Bohlen » Mon 4. Nov 2019, 11:59

Hello,

SOF bit is included in the count, SOF-Bit is at bit-position 0.
See attached picture:
Bitrate=500 kbit/s = 2µs/bit
Error-Generator is set to Bit-Position 24.
Count start at 0, therfore (24+1)*2µs=50µs. At this position a dominant level is generated.
Time betreen two orange cursor lines is 50µs. The red line indicate the position when a sequence of 6 dominant bits is detected.

Regards,
Gunnar Bohlen
Attachments
error-gen 500kbit.PNG
error-gen 500kbit.PNG (22.14 KiB) Viewed 16747 times

Post Reply