FR, MB91460, FR Clocks
Document No. 002-05317 Rev. *C
12
;============================================================================
; 5 Definition of Configurations
;============================================================================
; #set NOCLOCK 0 ; do not touch CKSCR register
#set MAINCLOCK 1 ; select main clock
; MB91461R: 1/4 of oscillation input
; Others: 1/2 of oscillation input
#set MAINPLLCLOCK 2 ; select main clock with PLL
#set SUBCLOCK 3 ; select sub clock (if available)
; #set PSCLOCK_CLKB 0x00 ; select core clock (initial)
#set PSCLOCK_PLL 0x10 ; select PLL output (x)
#set PSCLOCK_MAIN 0x30 ; select Main Oscillation
;;============================================================================
; 5.1 CLOCKSPEED == CLOCK_USER <<<
;============================================================================
; Must be configured only in the case of CLOCKSPEED is set to CLOCK_USER.
; Please see the corresponding application note.
#if (CLOCKSPEED == CLOCK_USER)
#set CLOCKSOURCE MAINPLLCLOCK; <<< Clock source
#set ENABLE_SUBCLOCK OFF ; <<< Sub clock: ON/OFF
#set PLLSPEED 0x010F ; <<< 0x48Ch, 0x48Dh: PLLDIVM/N ; 64 MHz
#set DIV_G 0x0F ; <<< 0x48Eh: PLLDIVG;
#set MUL_G 0x0F ; <<< 0x48Fh: PLLMULG;
; Clock Divider
#set CPUCLOCK 0x00 ; <<< 0x486h: DIV0R_B; => /1; 64 MHz
#set PERCLOCK 0x03 ; <<< 0x486h: DIV0R_P; => /4; 16 MHz
#set EXTBUSCLOCK 0x01 ; <<< 0x487h: DIV1R_T; => /2; 32 MHz
; CAN Clock
#set PSCLOCKSOURCE PSCLOCK_PLL; <<< 0x4C0h: CANPRE; => PLLx; 128 MHz
#set PSDVC 0x07 ; <<< 0x4C0h: CANPRE_DVC; => /8; 16 MHz
#set CANCLOCK 0x00 ; <<< 0x4C1h: CANCKD;
; Voltage Regulator
#set REGULATORSEL 0x06 ; <<< 0x4CEh: REGSEL;
#set REGULATORCTRL 0x00 ; <<< 0x4CFh: REGCTR;
; Memory Controller
#set FLASHCONTROL 0x032 ; <<< 0x7002h: FCHCR;
#set FLASHREADT 0xC413 ; <<< 0x7004h: FMWT;
#set FLASHMWT2 0x10 ; <<< 0x7006h: FMWT2;
#endif
;============================================================================
; 5.2 CLOCKSPEED == NO_CLOCK
;============================================================================
#if (CLOCKSPEED == NO_CLOCK)
#set CLOCKSOURCE NOCLOCK
#endif