When comparing two methods for writing to the VMAX register, I found different outputs between
int32_t Converter::velocityFloatToChip(float velocity_real);
and
int32_t Converter::velocityRealToChip(int32_t velocity_real);
(microsteps_per_real_position_unit = 51200, seconds_per_real_velocity_unit = 60, clock_frequency_mhz = 12)
velocityFloatToChip returns 85333 when passed velocity_real = 100 when it should return 119304
This is consistent with retuning the microsteps per second rather than [0..(2^23)-512 microsteps/t] for the register
Passing the result of velocityFloatToChip to velocityHzToChip before returning should solve this.