All of lore.kernel.org
 help / color / mirror / Atom feed
* Bug? -- NEVER getting controller-problem{back-to-error-active}
@ 2016-06-20  9:12 ajneu
  2016-06-20  9:22 ` ajneu
  2016-06-20 10:33 ` Wolfgang Grandegger
  0 siblings, 2 replies; 10+ messages in thread
From: ajneu @ 2016-06-20  9:12 UTC (permalink / raw)
  To: linux-can

Hi,

I'm using a PEAK USB Adapter (PCAN-USB FD) for normal CAN Frames (standard
format), and lsmod shows peak_usb as it should.

When running on a can bus and continually send out messages (one frame each
second).
But there is no other participant, so I will get NO ACK.


So berr-counter-tx counts up until it reaches
96:
-> enter state ERROR-WARNING.

   I then get a frame:
   Error: 
	Id  : 0x20000004
	Data: 0x0 0x8 0x0 0x0 0x0 0x0 0x0 0x0 
	controller-problem{tx-error-warning}


Then berr-counter-tx continues to count up to 
128:
-> enter state ERROR-PASSIVE.

   I then get a frame:
   Error: 
	Id  : 0x20000004
	Data: 0x0 0x20 0x0 0x0 0x0 0x0 0x0 0x0 
	controller-problem{tx-error-passive}


Then if I connect another participant, berr-counter-tx counter will start
decrementing (bec. of successfull ACK)
When berr-counter-tx is 
127:
-> enter state ERROR_WARNING.

   I then get a frame:
   Error: 
	Id  : 0x20000004
	Data: 0x0 0x8 0x0 0x0 0x0 0x0 0x0 0x0 
	controller-problem{tx-error-warning}


When berr-counter-tx reaches 
95: 
-> enter state ERROR_ACTIVE

BUT I NEVER GET the frame
	Id  : 0x20000004
	Data: 0x0 0x40 0x0 0x0 0x0 0x0 0x0 0x0 
	controller-problem{back-to-error-active}
WHY?
WHY DO I NOT GET THAT FRAME?
IS THIS A BUG???


The command
   ip -details link show can0     
shows...

3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode
DEFAULT group default qlen 10
    link/can  promiscuity 0
    can state ERROR-ACTIVE (berr-counter tx 94 rx 80) restart-ms 0
          bitrate 250000 sample-point 0.875
          tq 62 prop-seg 27 phase-seg1 28 phase-seg2 8 sjw 1
          pcan_usb_fd: tseg1 1..64 tseg2 1..16 sjw 1..16 brp 1..1024 brp-inc 1
          pcan_usb_fd: dtseg1 1..16 dtseg2 1..8 dsjw 1..4 dbrp 1..1024
dbrp-inc 1
          clock 80000000

...so I'm definately in error-active.
(But I never received back-to-error-active. Why? Is this a bug?)

Thanks.
ajneu



PS:
------------------------------------
When berr-counter-tx switches from 96 to
95:
and I then do command
   ip -details link show can0     
it shows...

3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode
DEFAULT group default qlen 10
    link/can  promiscuity 0
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
          bitrate 250000 sample-point 0.875
          tq 62 prop-seg 27 phase-seg1 28 phase-seg2 8 sjw 1
          pcan_usb_fd: tseg1 1..64 tseg2 1..16 sjw 1..16 brp 1..1024 brp-inc 1
          pcan_usb_fd: dtseg1 1..16 dtseg2 1..8 dsjw 1..4 dbrp 1..1024
dbrp-inc 1
          clock 80000000


That ALSO SEEMS TO BE A BUG. I expect berr-counter-tx to be 95 and not 0 as
shown.
But when berr-counter-tx decrements one more, I get 

3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode
DEFAULT group default qlen 10
    link/can  promiscuity 0
    can state ERROR-ACTIVE (berr-counter tx 94 rx 80) restart-ms 0
          bitrate 250000 sample-point 0.875
          tq 62 prop-seg 27 phase-seg1 28 phase-seg2 8 sjw 1
          pcan_usb_fd: tseg1 1..64 tseg2 1..16 sjw 1..16 brp 1..1024 brp-inc 1
          pcan_usb_fd: dtseg1 1..16 dtseg2 1..8 dsjw 1..4 dbrp 1..1024
dbrp-inc 1
          clock 80000000




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-21 10:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-20  9:12 Bug? -- NEVER getting controller-problem{back-to-error-active} ajneu
2016-06-20  9:22 ` ajneu
2016-06-20 10:33 ` Wolfgang Grandegger
2016-06-20 12:41   ` ajneu
2016-06-20 13:00   ` ajneu
2016-06-20 13:31     ` Wolfgang Grandegger
2016-06-20 13:53       ` ajneu
2016-06-20 14:28         ` Wolfgang Grandegger
2016-06-21  8:29           ` Stephane Grosjean
2016-06-21  9:58             ` Wolfgang Grandegger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.