Hi Jason Bourne,
My apologies for the late answer; for some reason I didn't get notification emails anymore.
1.
I am not really sure as what do you mean by "where the mode in FOC_IP core is inserted". The source code for the FOC HLS can be found in "IIoT-EDDP\Vitis\app_arty_7z_10\src\foc.cpp"; in the function "foc" you can see search for "Mode" to see how it is used.
When you have booted to Linux, you can use the program "focserver" to write to any register as follows:
focserver -w Mode=1
to set mode to 1, e.g. MODE_SPEED as described in the file "foc.h".
This command effectively performs masked write to the the control register. One can manually write to the control register, too. This is the first register (offset 0). Run "lsuio" to see the UIO devices, one of them is either "foc" or "xlnx,foc-". There you get the physical address of the register block. Important: parameter registers start at offset 0x40, status registers start at offset 0x80. On the Linux command line, you can use "devmem" to read and write to this address (offset by 0x40).
2. Regarding the initialization sequence, you can see one in the file "IIoT-EDDP\focserver\files\src\FocDevice.cpp", method "startMotor". When the motor was stopped before setting mode other than stopped, it runs encoder offset search routine at low motor speed by searching for the encoder reading at the moment when current in coil "A" crosses zero point. There is a small offset added, which might vary when you are using a different motor or a different encoder.
Hopefully this helps. If you have any questions, don't hesitate to ask.
best regards,
Andrei