TMS320F28335 Library  1.0
Documentation
system_controls.h File Reference

Header file for System Controls module. More...

Go to the source code of this file.

Functions

void setSystemControls (void)
 Configuration of system control register. More...
 

Detailed Description

Header file for System Controls module.

Definition in file system_controls.h.

Function Documentation

◆ setSystemControls()

void setSystemControls ( void  )

Configuration of system control register.

Parameters
/
Returns
/

Definition at line 13 of file system_controls.c.

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 }