CANcoder Firmware Update 126.96.36.199
Posted by CTR Electronics Team on 31st Mar 2022
In the last week we’ve had three different FRC teams report a similar intermittent issue with CANcoder when used in absolute mode with swerve modules.
The reported symptoms are:
- On bootup, CANcoder’s reported position does not correctly match the absolute position, despite being configured to do so.
- Reset CANcoder, correct absolute position is now reported via getPosition()
Based on the three anecdotes we’ve received; the following circumstances are required to reproduce the issue:
- CANcoder's initialization strategy is configured to boot to absolute mode
- CANcoder is used as a remote sensor, OR the robot application uses getPosition() method
- The robot has just powered up
No issues have been reported with teams using the getAbsolutePosition() API.
No issues have been reported with teams using the CANcoder as a relative sensor.
At least one of the three teams mentioned is not relying on the Magnet Offset feature of the CANcoder, which tentatively suggests this feature is not necessary to encounter the problem.
We’ve spent this week re-validating the CANcoder firmware and found no apparent issue with the device itself. This includes over twenty hours of testing with various procedures (power cycling, rotating sensor during power boot, etc.).
As a preemptive measure, we added additional integrity checking during bootup to ensure proper synchronization to the absolute position. This will improve position accuracy after the boot up procedure in the event the magnet field is momentarily unreliable during boot-up.
The firmware version is 188.8.131.52 and is available under the firmware link of the product page.
Alternatively, commanding the CANcoder to resync to its absolute reference after robot bootup also appears to resolve the issue. This is typically done via the setPositionToAbsoluteroutine/LabVIEW-VI. This could be called in disabled loop when the robot is not moving to ensure CANcoder’s position register has synced to absolute position.
If your team is observing this symptom, we recommend the following:
- Confirm magnet health is valid by checking for faults (Tuner Self-Test or Phoenix API).
- If sticky-faults indicate there was an issue in the past, clear stick-faults and periodically check them to see if they set again. This will reveal a potential issue with magnet/magnet-placement.
- Update firmware to 22.0.1 for improved boot-up synchronization OR
- Use the setPositionToAbsoluteroutine/LabVIEW-VI resync the CANcoder’s position register with the absolute reference OR
- Use getAbsolutePosition() API
If any team that has seen this issue, we ask that a Self-Test is taken immediately after the issue is observed and sent to firstname.lastname@example.org.