Hardware manual

82
Function
int cmd_do_nopxmc (cmd_io_t * cmd_io, const struct cmd_des * des, char * * param)
Arguments
Description
It is implementation of nopxmc command. This function/command switches off pxmc for 1st
motor. Thanks that, during some tests we can always switch off temporary the motor and avoid its
burning.
Function
int cmd_do_mypwm (cmd_io_t * cmd_io, const struct cmd_des * des, char * * param)
Arguments
Description
It is implementation of x# command. This function/command takes values from phase tables,
multiplies it by energy (0xff) and sends the result to the output. This allows testing the phase
tables and the rotation of the motor itself.
Function
int cmd_do_detection (cmd_io_t * cmd_io, const struct cmd_des * des, char * * param)
Arguments
Description
It is implementation of detection command. This function implements detection command which
is used by HalDetector program. The command needs 4 parameters: pwm1, pwm2, pwm3 and
whichIDX. If whichIDX is less than 0 it means that we are going to use pwm1, pwm2 and pwm3
as values taken from phase tables. If whichIDX is equal or greater than zero it means it is a
position of the index in phase tables and the proper pwm's should be taken from included phase
tables. In both cases pwm's are multiplied by ene which is equal to 1024 and the result is sent to
the output.