Specifications

RX62N Group Ethernet Transmit and Receive Settings
2. 1BDescription of Initial Settings
An initial settings program, which performs minimal hardware initialization processing such as memory initialization
after a power-on reset, is required in order to use the Ethernet driver of the sample program. Sample settings for the
initial settings program are described below.
2.1 12BDescription of Initial Settings Program
The initial settings program comprises multiple source files, including resetprg.c, which contains the main
PowerON_Reset_PC function, and hwsetup.c, which is called as a function. The main source files described below.
resetprg.c
The file resetprg.c is generated automatically by High-performance Embedded Workshop and contains declarations
for the PowerON_Reset_PC function. PowerON_Reset_PC is the first function run after a reset is canceled. The
start address of this function is set in the reset vector defined in vecttbl.c. Figure 2.1 shows the processing sequence
of the PowerON_Reset_PC function.
hwsetup.c
The file hwsetup.c contains declarations for the HardwareSetup function called by the PowerON_Reset_PC
function. The HardwareSetup function in turn calls the functions that make settings for the clock generation circuit,
module stop function, and I/O ports. These are the minimum hardware settings for the system.
Figure 2.2 shows the processing sequence of the HardwareSetup function.
Start
INTB setting
set_intb()
PowerON_Reset_PC function
Hardware initialization
HardwareSetup()
End
Set the start address of the variable vector table
in the interrupt table register (INTB).
FPSW setting
set_fpsw()
Initialize the floating-point status word (FPSW).
RAM area section initialization
_INITSCT()
Initialize section B (uninitialized data section) to zero.
For section D (initialized data section), copy the initial value
of the ROM area to the RAM area. To change the sections,
modify the table in dbsct.c.
Initialize the operating mode, clock generation circuit,
power-down (low-power) function, I/O ports, and bus.
Defined in hwsetup.c.
PSW setting
set_psw()
Initialize the processor status word (PSW).
Processor mode setting
Change_PSW_PM_to_UserMode()
Change the processor mode from supervisor to user.
Call main function
main()
Call the main function.
Execute BRK instruction
brk()
Figure 2.1 Processing Sequence of Reset Program
R01AN0629EJ0101 Rev.1.01 Page 4 of 52
Mar 31, 2011