Calibrate from Arduino Due

I am able to successfully read my encoder counter from Arduino Due through the Duart (Tx/Rx)
However, I am not able to calibrate from my Arduino. This is important as it has to be done after each bootup.
I programmed it in my Arduino like this:


Serial3 << "w " << "odrv0.axis0.requested_state " << AXIS_STATE_FULL_CALIBRATION_SEQUENCE << ‘\n’;

Can anyone tell me what I am doing wrong?
Thanks a lot.

In the meanwhile, I found a library that does the job correctly. See function: ODriveArduino::run_state() in library: