Hardware manual

78
Function
void init_irq ( void)
Arguments
void
no arguments
Description
This function set up IRQ interrupt, by putting index_mark_isr to the interrupt vector table.
Function
int motor_do_input (struct pxmc_state * mcs)
Arguments
mcs
Motion controller state information
Description
The function checks weather PXMS_PTI_b flag is enabled and if it is, than it calls
pxmc_irc_16bit_commindx function to update pxms_ap according to IRC.
Function
int motor_do_output (struct pxmc_state * mcs)
Arguments
mcs
Motion controller state information
Description
This function has two major tasks. Firstly if flag: PXMS_PTI_b is not enabled, the
motor_do_output tries to estimate actual position of the motor according to readings from hall
sensor. Secondly, it read the values from phase table(s) according to the value of pxms_indx.
Then it multiplies is by pxms_ene, and then it sends this result to PWM outputs.