RL78/G1G Sensorless Speed control of 120-degree conducting controlled permanent magnetic synchronous motor (Implementation)
R01AN3582EJ0100 Rev.1.00
Page 23 of 46
Jan 13, 2017
Table 3-9
List of Functions “mtr_ctrl_rl78g1g.c”
File name
Function name
Process overview
mtr_ctrl_rl78g1g.c
R_MTR_InitHardware
Input: None
Output: None
Initialization of the clock and peripheral
functions
mtr_init_clock
Input: None
Output: None
Initialization of clock
mtr_init_tau
Input: None
Output: None
Initialization of the Timer Array Unit (TAU)
mtr_init_intp
Input: None
Output: None
Initialization of external interrupt
mtr_init_cmp_pga
Input: None
Output: None
Initialization of Comparator0,1 and PGA
clear_wdt
Input: None
Output: None
Clear the watchdog timer (WDT)
mtr_clear_oc_flag
Input: None
Output: None
Clear the high impedance state
mtr_clear_trd0_imfa
Input: None
Output: None
Clear the Compare Match Timer A (IMFA)
Table 3-10
List of Functions “mtr_ctrl_rl78g1g_mrssk.c”
File name
Function name
Process overview
mtr_ctrl_rl78g1g_mrssk.c
mtr_init_trd
Input: None
Output: None
Initialization of Timer RD (TRD)
mtr_init_ad_converter
Input: None
Output: None
Initialization of the A/D converter
init_ui
Input: None
Output: None
Initialization of user interface
mtr_ctrl_stop
Input: None
Output: None
Motor stop processing
mtr_change_pattern
Input: (uint8) u1_pattern / conduction pattern
Output: None
- Change conduction pattern
- Set PWM duty
mtr_get_adc
Input: (uint8) u1_ad_ch / target A/D conversion channel
Output: (int16) s2_temp / A/D conversion value
Get A/D conversion value