[Ovmsdev] Not processing canbus frames anymore

Michael Balzer dexter at expeedo.de
Fri Apr 15 16:09:00 HKT 2022


Simon,

interrupt counters work different depending on the CAN transceiver & 
communication type, CAN2/3 are MCP2515 via SPI, while CAN1 is ESP32CAN 
(loosely SJA1000 compatible) via internal bus. There is generally only a 
loose connection, as any RX will trigger at least one interrupt, but not 
all interrupts are RX related, and an RX interrupt can cover multiple 
buffered packets.

But…
> Interrupts:             3036646
> Rx pkt:                 3044758

…that's possibly a hint you've frequent packet bursts on that bus, and 
that may be the cause you're experiencing the freeze so often. That 
would lead to a possible bug in the driver's RX handling for situations 
where new packets come in very fast. The MCP2515 isn't particularly 
simple to read & control in such situations, our driver may lack some 
crucial handling.

> Err flags: 0x01000001

For the mcp2515 driver, that means…

  * intstat = 0x01 → RX buffer 0 full
  * errflag = 0x00


…so no actual error condition. Some development of the error status is 
possibly readable from the system log and/or CAN log.

Regards,
Michael


Am 14.04.22 um 20:58 schrieb Simon Ehlen:
> AW: [Ovmsdev] Not processing canbus frames anymore
>
> My CAN1 bus works without problems, as before only CAN2 and CAN3 are 
> affected.
> Enclosed is a current excerpt from the status. Both CAN2 and CAN3 do 
> not provide any new data at the moment, although both buses are still 
> active. For me it is noticeable that currently CAN3 has more packets 
> than interrupts. I have observed the same with CAN2, but never with CAN1.
> Greg D. had indicated that there was a problem with CAN2/CAN3 in the 
> past where the buses went deaf after a while. Has the problem actually 
> been fixed in the past or is this still the problem that remains 
> unresolved?
> Is there any other information I could provide to help track down the 
> problem?
> CAN:       can1
> Mode:      Active
> Speed:     500000
> DBC:       none
> Interrupts:            14256668
> Rx pkt:                14245150
> Rx ovrflw:                   23
> Tx pkt:                       0
> Tx delays:                    0
> Tx ovrflw:                    0
> Tx fails:                     0
> Err flags: 0x00000000
> Rx err:                       0
> Tx err:                       0
> Rx invalid:                   0
> Wdg Resets:                   0
> Wdg Timer:                    0 sec(s)
> Err Resets:                   0
> CAN:       can2
> Mode:      Active
> Speed:     125000
> DBC:       none
> Interrupts:              101488
> Rx pkt:                  101483
> Rx ovrflw:                    0
> Tx pkt:                       0
> Tx delays:                    0
> Tx ovrflw:                    0
> Tx fails:                     0
> Err flags: 0x01000001
> Rx err:                       0
> Tx err:                       0
> Rx invalid:                   0
> Wdg Resets:                   0
> Wdg Timer:                    9 sec(s)
> Err Resets:                   0
> CAN:       can3
> Mode:      Active
> Speed:     500000
> DBC:       none
> Interrupts:             3036646
> Rx pkt:                 3044758
> Rx ovrflw:                    0
> Tx pkt:                       0
> Tx delays:                    0
> Tx ovrflw:                    0
> Tx fails:                     0
> Err flags: 0x01000001
> Rx err:                       0
> Tx err:                       0
> Rx invalid:                   0
> Wdg Resets:                   0
> Wdg Timer:                    0 sec(s)
> Err Resets:                   0
> Kind regards,
> Simon
>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev

-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20220415/b572952c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20220415/b572952c/attachment.sig>


More information about the OvmsDev mailing list