EasyManua.ls Logo

Renesas V850 Series - Common Area Initialization Processing Function; Revolution Start Initialization Processing Function; Link Directive File for V850 EIA3

Renesas V850 Series
186 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
CHAPTER 4 PROGRAM LIST
Application Note U17209EJ1V0AN
138
4.3.12 Common area initialization processing function
/****************************************************************************** /
/* Common area initialization */
/****************************************************************************** /
void ainit( void )
{
/* Initialization of flags */
error_flag = 0 ; /* Clear error flag */
init_flag = OFF ; /* Initial flag off */
disp_co = 100 ;
d_speed = 0 ;
/* Motor control area initialization */
stop_flag = ON ; /* Stop flag on */
object_speed = 0 ; /* Target speed 0 */
o_iqai = 0 ; /* Speed integral value 0 */
}
4.3.13 Revolution start initialization processing function
/****************************************************************************** /
/* Revolution start initialization */
/****************************************************************************** /
void start_init( void )
{
int i;
/* */
for ( i = 0 ; i < 21 ; i++ ) before_posi[i][1] = 0;
total_sa = 0 ;
sum_speed = 0 ;
speed_co = 100000 / TS ;
init_co = 0 ;
init_pat = 0 ;
init_upco = 0 ;
TQ0IOC0 = 0x55; /* Positive phase normal output, output enabled */
TQ0IOC3 = 0xfc; /* Negative phase inverted output, output enabled */
}
4.3.14 Link directive file for V850E/IA3
/****************************************************************************** /
/* Link directive file for V850E/IA3 */
/****************************************************************************** /
VECT_RESET: !LOAD ?RX V0x00000000 {
.vect_RESET = $PROGBITS ?AX .vect_RESET;
};

Table of Contents