Motor speed controller - how to limit maximum acceleration rate

This is a brushless DC. If I set a delay on the code the motor will stall.

How is the 3-phase generated? It has to be by a clock. Are you unable to set the clock at a low frequency and gradually increase it to the desired speed? The 3-phase frequency determines speed, and if there is PWM involved, it would control the amplitude of the sine wave. The speed is limited by the torque constant KV which controls the inductance and torque of the motor.