#I have a RP2040 and GIM4310 motor with
1 messages · Page 1 of 1 (latest)
The chip on the driver is a STSPIN32G4 btw, if that helps. It has an integrated CAN.
looks like transmit errors, can you post a photo of the wiring?
is this an RP2040 Feather with an MCP2515 FeatherWing?
https://learn.adafruit.com/adafruit-rp2040-can-bus-feather/overview I think it has the MCP25625 baked in
I'm powering the motor with a 24V supply, the RP2040 over usb-c from my macbook.
does the motor driver have a termination switch (turned on?)
There's a red light glowing inside of it, I can't find the datasheet for the driver unfortunately.
I have asked the supplier
I know nothing about the motor/driver
do you have another CAN setup you can test with, for comparion?
Does the transmit error mean it could be the driver not acking the message? Or does it imply the RP2040 is misbehaving?
I don't have another CAN setup. I have another motor, I will try that one now.
I was just thinking if you had another CAN-capable MCU, you could test code between those two to prove out the code, isolating the motor driver (or not) as the issue.
but testing other motor may yield a clue too
(I'm actually working on CAN bus today too, but having an entirely different issue)
Same result with the new motor. Maybe I will try PWM tomorrow and if that works, order a few extra bits - the supplier has a usb-can converter, and I might get a RS485 wing for this board and try communicate over that. I will think about it.
you could also try to listen passively and see if the motor driver is putting anything on the bus
dumb q - but it is correct to connect pins with canh together and canl together, I don't have to cross over or anything?
And does the message ID make a difference at all?
CANH-to-CANH, and CANL-to-CANL, common ground
for this, I did can_bus = CAN(spi, cs, baudrate=1000000, debug=False, silent=True) and tried to retrieve messages, I didn't get anything
any value in hooking a scope up the canh/canl and see if the motor is doing anything?
ID affects filter matching when listening, each node has to be unique ID
(ID also affects priority on the bus, but with two nodes, not an issue)
The motor ID is by default 1 according to the supplier, would I expect it to send a "hello" message when I power it up?
I haven't done silent, but that looks OK
maybe try debug=True and see what shows up
I haven't tried any commercial CAN devices, so not sure about behavior... my project I have total control of all nodes so not much help there
looks like it's fixed baurate at 1_000_000
SMC has been fairly responsive via email and sent me a windows app I can apparently use to talk to the motor over a usb-ttl adapter. I will try that and a few other things out tomorrow I think, if I can at least get the motor turning I will consider that a win!
Good luck! I'm not sure what else to suggest.