Hardware manual

58
interupt_dbg*
A/a. This routine is called in debug mode to store some debug
information about the motor. The pointer to debug function
is stored in: pxms_do_deb.
index_mark_isr_1*
will be detected. Because it is interrupt routine, it is
It can be use only once.
index_mark_isr*
This function works exactly as previous one. The only
difference is that this is called by IRQ. It can be use only once.
init_pwm*
Makes the initialization of PWM.
init_irc*
Makes initialization of IRC.
init_hal*
Initializes hall sensors.
init_sampling*
Initializes TPU and sets up the main interrupt routine to
pxmc_sfi_isr.
set_irq*
motor_do_input*
This function should be pointed by pxms_do_inp. It is
responsible for updating the state information like actual
position and speed.
motor_do_output*
This function should be pointed by pxms_do_out and
according to PXMS_PTI_b and PXMS_PHA_b flags it calculates
or not the actual value of pxms_ptindx. Next, it takes the
power from pxms_ene and sends proper values to PWM
outputs.
* - function is not accessible from outside of the library.
Additionally in the hi_cpu2 directory can be found these files:
pt2000.h
pt2048.h
pt4000.h
pt.c
pxmc_config_h8mirosot.h
Makefile
Makefile.omk
First three files: pt2000.h, pt2048.h and pt4000.h have definition of phase tables for motors
which need 2000, 2048 or 4000 number of periods.
The pt.c file imports right phase table and adds it to the project.
The pxmc_config_h8mirosot.h was written by the authors of the board and has some definitions
which are used during compilation.