
CSI to SPI Peripheral Communication in V850ES Microcontrollers
which determines where the program will begin on a hardware reset and provides initial setup of
system registers before calling the main() function.
When Applilet is used to generate a C program for the V850ES MCU, the crte.s startup assembly
language file is automatically generated, and includes a call to the Clock_Init() function to set the
system clock, and a call to the SystemInit() function which in turn calls initialization routines for
some (but not all) peripherals.
Figure 11. crte.s Startup File
Crte.s
RESET
System Register Init
CALL Clock_Init( )
other initialization
CALL SystemInit( )
CALL main( )
Clock_Init( )
Set PCC and PLL
A
SystemInit( )
CALL Port_Init( )
CALL TM00_Init( )
After the SystemInit() function finishes, the startup code calls the main() function of the user program.
So at the start of the main() function, peripheral initialization has been done for several peripherals. The
main() function does not need to call these individual peripheral initialization routines.
Note that SystemInit() does NOT automatically call the CSI00_Init() routine to initialize the CSI00
peripheral.
2.6.2 Main( ): Main Program for NEC Electronics CSI to SPI Serial Communication
The main( ) program is called from the startup code after peripheral initialization. The program
calls routines to initialize input switch handling and LED output.
16
Kommentare zu diesen Handbüchern