We’re trying to use the SparkMax Controller with the NEO brushless motors and are running into issues when trying to interface with them over CAN. (PWM works fine)
Part of this probably comes down to us not using them for the FRC comp, we’re a group of uni students using them for an entry into the university rover challenge but more importantly the software is based around ROS and Arduino – not the RoboRIO and the FRC libraries.
We can’t seem to get any sort of response, currently the bus isn’t being pulled dominant in the ACK slot, we’re not sure if this is because the message is invalid or some other control isn’t being set – eg the RTR slot.
The current test message involves trying to set periodic_status_1 period to 3855ms (0x0F0F). So based off of the code in CANSparkMaxFrames.h (line 48) and CANSparkMaxLowLevel.cpp (lines 214 and 228) and the FRC CAN docs that needs to be addressed to the following id: [28:24] = 2; motor controller id [23:16] = 5; rev robotics id [15:6] = 0x060; Api class & index, index isn’t used, value taken from driver code [5:0] = 2; ID of motor controller, set to 2 using windows client
Putting those bits together we get 0x02051842, which is what we see being transmitted on the CANbus physically (oscilloscope trace: https://i.imgur.com/sVHdZA9.png) along with the correct data, length and CRC. Yellow is CAN_H, magenta CAN_L, green and blue are rx and tx respectively of the MCP2562 transceiver connected to a Teensy 3.6. The code used to generate this can be found here: https://pastebin.com/trfkzcRp
The request: If you’ve had success configuring these controllers over CAN would you mind capturing an oscilloscope trace of the CAN bus? The docs on rev robotics site don’t dig into any of those details as I assume they only expect FRC people to use their stuff