<option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.FLOAT_SUPPORT.181229071" name="Specify floating point support (--float_support)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.FLOAT_SUPPORT" value="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.FLOAT_SUPPORT.VFPv3D16" valueType="enumerated"/>\r
<option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.ABI.972870798" name="Application binary interface (tiabi, ti_arm9_abi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.ABI.eabi" valueType="enumerated"/>\r
<option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.ENUM_TYPE.1607856814" name="Designate enum type (Default is packed for EABI) (--enum_type)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.ENUM_TYPE" value="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.ENUM_TYPE.packed" valueType="enumerated"/>\r
- <option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_LEVEL.release.1826615201" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_LEVEL.release" value="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_LEVEL.3" valueType="enumerated"/>\r
+ <option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_LEVEL.release.1826615201" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_LEVEL.release" value="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_LEVEL.4" valueType="enumerated"/>\r
<option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_FOR_SPEED.1928323899" name="Optimize for speed (--opt_for_speed, -mf)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_FOR_SPEED" value="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.OPT_FOR_SPEED.5" valueType="enumerated"/>\r
<option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.DEBUGGING_MODEL.43248373" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>\r
<option id="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.INCLUDE_PATH.403820922" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_4.9.compilerID.INCLUDE_PATH" valueType="includePath">\r
#define configUSE_TICK_HOOK 1\r
#define configUSE_TRACE_FACILITY 0\r
#define configUSE_16_BIT_TICKS 0\r
-#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 90000000 ) /* Timer clock. */\r
+#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 50000000 ) /* Timer clock. */\r
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
#define configMAX_PRIORITIES ( 8 )\r
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )\r
#define serialVIM_REQMASKSET0_REG ( * ( ( volatile unsigned long * ) 0xFFFFFE30 ) )\r
#define serialVIM_SCIHINT_RAM ( * ( ( void (**)(void) ) 0xFFF82038 ) )\r
\r
+/* Baudrate */\r
+#define serialBAURATE 19200.0 /* Baudrate in Hz */\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Global control 1 */\r
serialSCI_GCR1_REG = 0x03010032UL;\r
/* Baudrate */\r
- serialSCI_BAUD_REG = 292;\r
+ serialSCI_BAUD_REG = ((unsigned long)((configCPU_CLOCK_HZ / (16.0 * serialBAURATE) + 0.5)) - 1) & 0x00FFFFFF;\r
/* Transmission length (8-bit) */\r
serialSCI_LENGTH_REG = 8 - 1;\r
/* Set SCI pins functional mode */\r
\r
#include "sys_system.h"\r
\r
-\r
-/** @fn void systemInit(void)\r
-* @brief Initializes System Driver\r
-*\r
-* This function initializes the System driver.\r
-*\r
-*/\r
-\r
+#define startupCPU_100MHZ 1\r
\r
void systemInit(void)\r
{\r
/** @b Initialize @b Flash @b Wrapper: */\r
\r
/** - Setup flash read mode, address wait states and data wait states */\r
+#if startupCPU_100MHZ == 1\r
+ /* 100MHz */\r
+ flashWREG->FRDCNTL = 0x01000000U\r
+ | (2U << 8U)\r
+ | (0U << 4U)\r
+ | 1U;\r
+#else\r
+ /* 180MHz */\r
flashWREG->FRDCNTL = 0x01000000U \r
| (3U << 8U) \r
| (1U << 4U) \r
| 1U;\r
+#endif\r
\r
#if 0\r
/** - Setup flash bank power modes */\r
* - Setup Pll multiplier \r
*/\r
\r
+#if startupCPU_100MHZ == 1\r
+ /* 100MHz */\r
+ systemREG1->PLLCTL1 = 0x00000000U\r
+ | 0x20000000U\r
+ | (0U << 24U)\r
+ | 0x00000000U\r
+ | (5U << 16U)\r
+ | (74U << 8U);\r
+#else\r
/* 180Mhz */\r
systemREG1->PLLCTL1 = 0x00000000U \r
| 0x20000000U \r
| 0x00000000U \r
| (5U << 16U) \r
| (134U << 8U);\r
+#endif\r
\r
/** - Setup pll control register 1 \r
* - Enable/Disable frequency modulation\r
| 1U;\r
\r
/** - Setup RTICLK1 and RTICLK2 clocks */\r
+ /* 90MHz (180Mhz/2) */\r
systemREG1->RCLKSRC = (1U << 24U)\r
- | (SYS_VCLK << 16U) \r
+ | (SYS_VCLK << 16U)\r
| (1U << 8U) \r
| SYS_VCLK;\r
\r