Hi,
I am trying to add CAN bus support to my Omnibusf4v6. So what I have done was to modify the original hwdef file by reassigning the I2C pins to CAN pins. Then I build the latest copter firmware (4.0.4) and flashed the board. Next I wired up a SN65HVD230 transceiver module to the CAN pins. In the parameters I set the CAN_P1_DRIVER to 1 and also selected GPS2 type as UAVCAN.
To test my setup I build the f103-gps AP_Periph node, flashed it to a bluepill board and hooked up an old GPS I had laying around. On the bluepill I also added a SN65HVD230 transceiver. I tested this node with the UAVCAN GUI tool (using a SLCAN adapter not MP) and it seems to work fine. The dynamic id allocations works and I can see the node with operational status and adjust the parameters (changed node id to 20).
So then I hooked up the node to the flight controller to try it out. But it does not detect the GPS and I keep getting a āPreArm: UC: Failed to add Node 10!ā messages. Even if I remove my node I still get these messages. Node 10 is suppose to be the copterās id, so it seems to have trouble adding itself⦠Glancing at the code it seems this message is generated in AP_UAVCAN_DNA_Server.cpp, but I canāt yet figure out why.
It looks like the CAN interface on the board works, kind of, since when I use the SLCAN tool in Mission Planner I can see my node. Although it does not appear to be fully initialised as it does not show the node name (which it does in the UAVCAN GUI tool).
I can also not view the parameters.
Somewhere on gitter I read of somebody with a Sparky2 (also a F405 board) having a similar issue (failed to add node) and he was of the opinion that it could be a bug with F405 boardsā¦
Does anybody have any ideas of what I can try to solve this?