Measurement of motor parameters

I want to know how the resistance and inductance of the motor are measured? For example, what kind of signal does the chip give, and then through the formula calculation, is there a document for reference? I have read the literature on the measurement of resistance and inductance in the previous question (published in 2000). How to ensure the accuracy of measurement in practical applications?

You can inspect the R and L measurement functions here.

The R measurement is done by ramping up the voltage (duty cycle) with an “I loop” until the current reaches motor.config.calibration_current. R is simply the voltage required divided by the current.

The L measurement sens a voltage squarewave into the motor, and inspects the amplitude of the resulting current triangle wave.

Can you provide some further explainations about the principle? Or are there any papers you refered to? Thank you so much.