Keil™, An ARM® Company

MCBSTR7 User's Guide

Configuring the Clock Control Unit

The STR7 devices contain a Reset & Clock Control Unit configured as follows:

#include <71x_lib.H>
    :
    :
void main (void)  {
  RCCU_MCLKConfig(RCCU_DEFAULT);                    // MCLK = RCLK
  RCCU_FCLKConfig(RCCU_RCLK_2);                     // FCLK = RCLK/2
  RCCU_PCLKConfig(RCCU_RCLK_4);                     // PCLK = RCLK/4
  RCCU_PLL1Config(RCCU_PLL1_Mul_12, RCCU_Div_2);    // 48MHz PLL @ 16MHz XTAL

  while (RCCU_FlagStatus(RCCU_PLL1_LOCK) == RESET); // Wait for PLL to Lock
  RCCU_RCLKSourceConfig(RCCU_PLL1_Output);          // Select PLL for RCLK
    :
    :
}

This configuration sets a CPU clock of 48MHz when using the 16MHz XTAL provided on the MCBSTR7 Board. You may review the clock setup in µVision, in the dialog Peripherals - Power, Reset and Clock Control Unit.