CANBus usage is 100+%

Hi, our team just finished wiring our 2024 robot and everything looks pretty good.
The voltage is normal, however the can usage is 100%

All cancoders are green and everything physically looks normal. We are daisy chaning it and having 14 sparkmaxes, 4 cancoders and 1 pigeon2.

1 Like

You can try tuning CAN status frame timing. Both REV and CTRE libraries support this in some form.

2 Likes

Hey, I was wondering if you know where I can change this for sparkmaxes?

I haven’t found the same info in the new docs site, but here’s the info:
Control Interfaces - SPARK MAX

Also, here’s the method in the javadocs: https://codedocs.revrobotics.com/java/com/revrobotics/cansparklowlevel#setPeriodicFramePeriod(com.revrobotics.CANSparkLowLevel.PeriodicFrame,int)

You can also reduce this by splitting off some of your CAN into a separate CAN loop using a CANivore.

1 Like

In this particular case, using a CANivore is a pretty expensive investment for minimal benefit, since it won’t work with Spark Maxes, so the most you could isolate is the CANCoders and Pigeon.

1 Like

Alright, right now all I want working is the swerve so I just practically disabled the CAN of all the motors we aren’t using.

The usage is still above 100% and something tells me it’s because I am doing it wrong.

If the CAN utilization is staying constant at 100%, something is probably wrong somewhere. Tuning status frame timing usually works if the utilization is dwindling near 100%, but probably won’t help if its stuck at 100% (not sure though, might be worth trying). We used the exact same device type and amount on our 2023 robot (plus a PCM), and our CAN utilization fluctuated between 50-60%. Unfortunately, beyond checking all wire and connections, I’m not entirely sure what steps you could take to track down this issue.

does having can wires too long make utilization higher?

Try disabling much of telemetry.

If you have 100% CAN utilization, you’re probably actually using it. So,

  1. Use hardware PID on local encoders whenever possible, instead of software PID
  2. Poll devices via CAN only when needed

What problems are you having besides the fact that CAN utilization is 100%? If the CAN utilization was actually 100%, I’d have expected to see stale data notices from the CANCoders, but your screenshot of the DS doesn’t show that (unless Phoenix 6 doesn’t report that).

Have you tried it without AdvantageKit?

1 Like

We are having that error with CANCoders, idk why it wasn’t in that screenshot.

Iffy CAN wiring can drive up utilization, but your error counts are all zero, so this seems less likely. I’d try something drastic, like splitting your CAN bus in half, just to see if you can get the utilization to drop. FWIW, we’ve run 14 SPARK MAXes (2022) without issue, but that robot used SRX MAG Encoders (not CAN) and a navx-MXP (same).

We like using the canivore simply so that we have a backup can loop. i.e. since our drivetrain is all on the canivore and are subsystems are on another loop if the can on the subsystem breaks we still have a working drivebase