![Renesas rl78/g1g Скачать руководство пользователя страница 26](http://html1.mh-extra.com/html/renesas/rl78-g1g/rl78-g1g_user-manual_1440448026.webp)
RL78/G1G Sensorless Speed control of 120-degree conducting controlled permanent magnetic synchronous motor (Implementation)
R01AN3582EJ0100 Rev.1.00
Page 26 of 46
Jan 13, 2017
Table 3-14
List of Functions “mtr_interrupt.c”
File name
Function name
Process overview
mtr_interrupt.c
mtr_oc_intp0_interrupt
Input: None
Output: None
Overcurrent detection process (Hardware detection)
- Disable INTP0 interrupt servicing
- Event processing selection function call (Generate error event)
- Changing the motor status (Set the flag of error about overcurrent)
mtr_oc_cmp0_interrupt
Input: None
Output: None
Overcurrent detection process (CMP0 interrupt)
- Disable CMP0, CMP1 interrupt servicing
- Event processing selection function call (Generate error event)
- Changing the motor status (Set the flag of error about overcurrent)
mtr_oc_cmp1_interrupt
Input: None
Output: None
Overcurrent detection process (CMP1 interrupt)
- Disable CMP0, CMP1 interrupt servicing
- Event processing selection function call (Generate error event)
- Changing the motor status (Set the flag of error about overcurrent)
mtr_carrier_interrupt
Input: None
Output: None
Calling every
50 [μs]
- Measure invertor bus voltage
- Measure voltage of each phase and cancel offset
- Calculate pseudo center voltage
- Detect zero-cross
- Calculate the rotational speed
- Set delay to change pattern
- Change pattern per pseudo Hall pattern call
- Drive process for open loop call
- Clearing compare match flag A function call
mtr_1ms_interrupt
Input: None
Output: None
Calling every 1 [ms]
- Run mode management
Setting speed reference
Setting voltage reference
Setting PWM duty
- Error check function call
- Motor stop detection function call