AC3.6-dev 4.July2017: How to enable CAN

Hey

I’ve seen that few days ago EShamaevs big UAVCAN stuff got merged (finally, YEAH), so I’ve flashed AC3.6-dev of today, to play with it.

But I can’t figure out how to enable Uavcan. I’m using MP. In the InitialSetup->UAVCAN pane the Enable Uavcan field is deactivated, I can’t do anything with it. In the Full Parameter list the BRD parameters are cleared of any CAN related stuff. I do see the CAN parameters CAN_D1/2_PROTOCOL and CAN_P1/2_DRIVER, but have no idea what they do.

I would be most thankful if I could get some brief instructions.

Thx, Olli

I believe UAVCAN can only be enabled on v3 firmwares because those are the ones that run on the STM32 cpu’s that don’t have the 1MB CPU bug. Also these require a reboot after enabling to expose the parameters.

but just tested on a v4 firmware and also doesn’t come up. I’m reporting it.

I managed to get this to work on a Pixhawk 2.1 (Cube) by setting:

CAN_D1_PROTOCOL and CAN_D2_PROTOCOL to 1,
CAN_P1_DRIVER and CAN_P2_DRIVER to 1

The BRD_CAN_* parameters have been removed since this PR has been merged.

Thanks. So on a v3 it works, but curious to recheck on a v4.

And those parameters are only related to the 2 exposed UAVCAN ports of the Cube

so the guess would be
CAN_P1_DRIVER = 1
CAN_P2_DRIVER = 0
?

what is about v2 boards?

(I have a AUAV-X2)

You’ll have to check if the STM32 CPU is affected by the 1MB bug. That was the reason to create 2 images, v2 and v3, for the PixHawk style boards like the AUAV-X2. You can search here for a easy way to check which CPU you have.

PX is setup for physical port (CAN1, CAN2) and the number is the virtual driver that the port gets connected to.
DX is driver type (protocol), currently 0 - disabled, 1 - UAVCAN.

So for most users it will be: P1, P2 = 1, D1 = 1, D2 = 0

Luis:
ähm, I know which cpu is on my boards (< rev3, so, affected)

the question was rather if the new UAVCAN stuff in master also works for v2

EShamaev:
many thx
clarifications also on v2,v3,v4?