-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
I may have found a bug/oversight regarding the newer Sensored ERPM Start parameter and the Motor Setup function.
Any time you write to the motor CFG, it seems to max the Sensored ERPM Start parameter value at 90% of Sensorless ERPM value, since it's always expected to be lower for proper functionality. However there seems to be one exception here:
If you run the full Motor Setup function, such as through the Motor Setup wizard, it sets Sensorless ERPM to what was called for in the parameters of the function. However, it does NOT set Sensored ERPM Start, nor does it cap it automatically like it does when you write to the Motor CFG. So if you run Motor Setup and ask for a Sensorless ERPM lower than your current Sensored ERPM Start, then you will have a Sensored ERPM Start that is higher than intended to be possible until you write to your Motor CFG again.
I noticed this, as for VESC Onewheels we've always used around 2000 ERPM for Sensorless ERPM. So if starting with a default config and asking for 2000, you end up with Sensorless ERPM of 2000 and Sensored ERPM Start of 2500 (default value). The main side effect you would see from this is that the Motor Direction test would often not work properly, often locking up and not able to spin up beyond low hall sensor speeds.
Most write their Motor CFG at least once before attempting to ride, so it would typically resolve itself, but I'd imagine trying to ride it with this issue present would cause serious issue.