TMS320F28335 Library  1.0
Documentation
system_controls.c
Go to the documentation of this file.
1 
6 #include "system_controls.h"
7 
14 {
15  EALLOW;
16  TMC_BASE_SCR->WDCR = 0xE8; // Watchdog Control Register --> Watchdog check --> Disable the watchdog module --> Clear Watchdog reset status flag bit
17 
18  while(!TMC_BASE_SCR->PLLSTS&0x1); // Wait for PLL to complete (PLLSTS[PLLLOCKS] = 1) to change PLLSTS[DIVSEL]
19  TMC_BASE_SCR->PLLSTS |= (0x1 << 6); // No external clock --> Disable oscillator fail-detect logic
20  TMC_BASE_SCR->PLLSTS |= (0x2 << 7); // Select Divide By 2 for CLKIN
21 
22  TMC_BASE_SCR->PLLCR |= 0xA; // Set the PLL clocking ratio
23 
24  TMC_BASE_SCR->PCLKCR0 = 0xCFFF; // Set all Peripheral Clock Control 0 modules (except McBSP) to be clocked by system clock
25  TMC_BASE_SCR->PCLKCR1 = 0xFFFF; // Set all Peripheral Clock Control 1 modules to be clocked by system clock
26  TMC_BASE_SCR->PCLKCR3 = 0x2700; // Set all CPU-Timer and GPIOs to be clocked by system clock
27  EDIS;
28 }
29 
30 
TMC_BASE_SCR.h
System-Control-Register header file.
setSystemControls
void setSystemControls(void)
Configuration of system control register.
Definition: system_controls.c:13
system_controls.h
Header file for System Controls module.