Kinetis:SIM add paramiterized SIM_CLKDIVx_xxFRAC|DIV macros
The makes for cleaner board definitions like: Divider output clock = Divider input clock * ((PLLFLLFRAC+1)/(PLLFLLDIV+1)) SIM_CLKDIV3_FREQ = BOARD_SOPT2_FREQ × [ (PLLFLLFRAC+1) / (PLLFLLDIV+1)] 90 Mhz = 180 Mhz X [(0 + 1) / (1 + 1)] #define BOARD_SIM_CLKDIV3_PLLFLLFRAC 1 #define BOARD_SIM_CLKDIV3_PLLFLLDIV 2 #define BOARD_SIM_CLKDIV3_FREQ (BOARD_SOPT2_FREQ * (BOARD_SIM_CLKDIV3_PLLFLLFRAC / BOARD_SIM_CLKDIV3_PLLFLLDIV))
parent
e1278c0c
Please register or sign in to comment