@schew,
Regenerative braking happens when you command the ESC to transition from a higher speed to a lower speed. Also, if brake_to_stop parameter is set to 1, the ESC will apply braking when it is commanded to stop (0 rpm or 0 power) or it times out. If the brake_to_stop parameter is set to 0, the ESC will not brake during stopping or time out, instead the motor will spin freely (coast) to a stop.
So, brake_to_stop parameter does not affect normal operation and you should just keep that at zero, unless you REALLY need the motor to stop very fast when you disarm. (but then if you are connected to a power supply at that point, it can cause issues described here : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-tools/doc/regenerative_braking.md )
Turning off Regenerative Braking completely is possible on M0129 ESC, but it is not currently supported in the firmware.
So, to answer your question, if you run the ESC calibration using voxl-calibrate-esc.py script (according to these instructions : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-tools/calibration.md), there will not be a regenerative braking event during this procedure (unless you set brake_to_stop to 1, see above). In the calibration procedure, the ESC is commanded to increase the applied power in small steps and at the end the commands from the script stop, so ESC times out and spins down.
I have just run a test using a power supply (set to 12V) and modified calibration script, which shows voltage and current data after the calibration has finished. See plot below:
ad88ce7f-2a54-48a5-96cb-970af729443a-image.png
From the plot you can see that at t=12s, the test stops, the voltage (which was dipping during the test as current increased) comes back to 12V without overshoot and the current just drops to zero (does not become negative, which would be the case, if regenerative current was present).
I have explained what will happen if you run the esc calibration procedure (in its current version) while using a power supply. However, you should not do any aggressive spin testing with a power supply, especially step tests, where the ESC is commanded to ramp up and then down. The reason why we do not recommend doing any testing with a power supply is that it is possible to forget that the ESC is plugged into the power supply (not battery) and start performing tests which can damage the ESC or power supply. If you start hitting the Power Supply's over-current limit, voltage may drop and there could be strange behavior and ESC could de-sync.
You also need to ensure that the Power Supply can source enough current to perform the calibration. If needed, you can decrease the maximum power that is applied during calibration (using --pwm-max parameter)
So, with all that being said.. We still do not recommend testing the ESC with a power supply. If you still choose to do it, it would be at your own risk and i suggest starting by limiting --pwm-max parameter to a low value, say 40-50 and looking at the plot to ensure all the data looks similar to the plot in the calibration doc. Then gradually increase the --pwm-max parameter to 60, 70, 80, 90, checking the plot each time. You could stop at 90 and use that calibration result.
Alex