Hardware manual

57
pxms_me:PWM_MAX<<8, //6144
pxms_ptirc:bldc_ptirc, // IRC count per phase table
pxms_ptper:bldc_ptper, // Number of periods per table
pxms_ptshift:0, // Shift of generated phase curves
pxms_ptvang:bldc_ptirc/4, // Angle (in irc) between rotor
and stator mag. fld.
pxms_ptptr1:bldc_phase1,
pxms_ptptr2:bldc_phase2,
pxms_ptptr3:bldc_phase3,
pxms_ptamp:0x7fff,
pxms_hal: 0x40,
pxms_cfg:PXMS_CFG_MD2E_m | PXMS_CFG_HLS_m |
PXMS_CFG_HPS_m | PXMS_CFG_HDIR_m| PXMS_CFG_SMTH_m| 0x1
};
In below table there is a full list of all functions which were written or created by my. One
exception is tpu_irc_ap2hw, which was taken from previous versions of the library.
Name of pole
Short description
pxmc_initialize
This function makes full initialization of the board, including:
PWMA, IRQ, HALs and TPU. We should always call this
function as first in external applications.
pxmc_set_default_functions_for_
all_motors
Because hi_cpu2 board can also work with stepper motor, so
this function allows us to make initialization of the all
connected motors different than default brushless motor.
Initialization depends on the given parameter, which
describes if it is brushless or stepper motor.
pxmc_set_default_functions
This function makes initialization of given motor according to
given parameter, which describes if it is brushless or stepper
motor.
pxmc_sfi_isr*
This function is interrupt service routine and is always called
when in TPU compare match occurs (once per sampling
period). The function calls later specialized routines for input,
output and so one. Please see below.
interupt_input*
This is specialized function is called during interrupt. In
general it calls function which pointer is shown by
pxms_do_inp and due to this it is responsible for actualizing
the actual position and speed of the motor.
interupt_controller_and_output*
A/a, but it calls functions which are pointed by: pxms_do_con
and pxms_do_out.
interupt_generator*
A/a, but it is responsible for calling generator pointed by:
pxms_do_gen.