Near crash. Lift motor delayed start?

Very near crash on back transition.
Have just done the 2nd flight of my Kite3 VTOL. On the transition back to VTOL it did an alarming roll and recovered at about 3m. My interpretation of the logs is that one lift ESC was slow to respond to the PWM demand but please advise. I cant see anything else strange here.
You will see from the logs that the motor balance seems off but this is probably wind effect as it seems to depend on heading.
Now, this is a Vimdrones CanBus ESC with home modified AM32 firmware that has been flying for many hours on the previous version. The modified firmware does a short reverse after the ESC goes to idle, for my prop aligning system, detailed in my other posts. As it had not just returned to idle I donít think the routine could have been triggered.
It’s unfortunate that this modified firmware is needed as I now have the Mad Components 4112 aligning motor but on the first test 2 motors stopped at 90deg. The reversing firmware seems to jiggle them into place.

The pic shows the current demand lags the PWM demand but then catches up.

A.I. thinks it could be my ESC setting ‘startup power’ was 50% and min duty cycle was 1%.

The pullup braking is quite sharp and I guess could lead to reverse flow in the lift motors.

@Vince_Hogg I have added desync_happened to the dronecan esc meesage error_count field, on master branch, if you can add that change would be helpful?Also I have noticed the RPM has been reduced to 0 once on startup, unfortunately the firmware can’t report negative RPM value, so can’t tell the initial direction, but I think your designed mechanical parts will block the reverse spin?

@Huibean Hi, no I only used the mechanical motor lock on the previous plane. This new version has motors that are supposed to align themselves, however it doesn’t work well so I used the old firmware to jiggle them into position. It would be really great if the AM32 people could add a ‘jiggle after stop’ option.

Sure, if there was a message to report desync it could be good.

This issue is proving quite difficult.

Have been through all ESC settings and am convinced it’s not that. The problem is now located in the rear right motor position. Both motor and ESC have been swapped. I have reflowed the wire ends.

I had an idea that sharing a carbon tube with a servo line may be not helping. I disconnected the servo line and so far have not see the problem since. The problem is, that you may do 100 motor starts but still can’t be sure the problem is fixed. Anyway why is the other side not doing it ? (Not for the last 500 tests).

I’m wondering if my H ‘radial’ canbus wiring system may be not ideal but it has been working flawlessly on my previous build of this plane (with different tail servos).

So if it is canbus interference, what to do? I may try a capacitor on the servo power lines and may also try dropping the can bitrate.

And advice welcome.

Make a compliant CAN installation with wires going there and back or splitting the bus in two halves such that each is complaint. In either case ensure that termination resistors on the FC are disabled or removed.

Yes im now convinced it’s due to can stubs being too long. I had a star config with the longest about 75cm. I seem to have got away with it on the previous Kite2 with the same arrangement. Without massive re wiring I can probably do the main line out to the motor beam plug and have 30cm stubs.

The FC and the GPS have fixed terminator resistors so I shall try to finish the line with the GPS in the wing stubs.

I obviously overlooked some of the canbus requirements so will rewire like this.

The green circles are the motor beam connector block. The stubs are now only 30cm or less.

FC and GPS have fixed terminator resistors.