mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-23 06:51:58 -04:00
Slow configured clock in the RM48 and TMS570 demos to 50MHz.
This commit is contained in:
parent
0023cb1f8e
commit
5512102f92
|
@ -200,7 +200,7 @@
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
<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"/>
|
<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"/>
|
||||||
<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">
|
<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">
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
#define configUSE_TICK_HOOK 1
|
#define configUSE_TICK_HOOK 1
|
||||||
#define configUSE_TRACE_FACILITY 0
|
#define configUSE_TRACE_FACILITY 0
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 90000000 ) /* Timer clock. */
|
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 50000000 ) /* Timer clock. */
|
||||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||||
#define configMAX_PRIORITIES ( 8 )
|
#define configMAX_PRIORITIES ( 8 )
|
||||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
|
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
|
||||||
|
|
|
@ -125,6 +125,8 @@
|
||||||
#define serialVIM_REQMASKSET0_REG ( * ( ( volatile unsigned long * ) 0xFFFFFE30 ) )
|
#define serialVIM_REQMASKSET0_REG ( * ( ( volatile unsigned long * ) 0xFFFFFE30 ) )
|
||||||
#define serialVIM_SCIHINT_RAM ( * ( ( void (**)(void) ) 0xFFF82038 ) )
|
#define serialVIM_SCIHINT_RAM ( * ( ( void (**)(void) ) 0xFFF82038 ) )
|
||||||
|
|
||||||
|
/* Baudrate */
|
||||||
|
#define serialBAURATE 19200.0 /* Baudrate in Hz */
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -174,7 +176,7 @@ xComPortHandle xReturn = ( xComPortHandle ) 0;
|
||||||
/* Global control 1 */
|
/* Global control 1 */
|
||||||
serialSCI_GCR1_REG = 0x03010032UL;
|
serialSCI_GCR1_REG = 0x03010032UL;
|
||||||
/* Baudrate */
|
/* Baudrate */
|
||||||
serialSCI_BAUD_REG = 292;
|
serialSCI_BAUD_REG = ((unsigned long)((configCPU_CLOCK_HZ / (16.0 * serialBAURATE) + 0.5)) - 1) & 0x00FFFFFF;
|
||||||
/* Transmission length (8-bit) */
|
/* Transmission length (8-bit) */
|
||||||
serialSCI_LENGTH_REG = 8 - 1;
|
serialSCI_LENGTH_REG = 8 - 1;
|
||||||
/* Set SCI pins functional mode */
|
/* Set SCI pins functional mode */
|
||||||
|
|
|
@ -16,24 +16,26 @@
|
||||||
|
|
||||||
#include "sys_system.h"
|
#include "sys_system.h"
|
||||||
|
|
||||||
|
#define startupCPU_100MHZ 1
|
||||||
/** @fn void systemInit(void)
|
|
||||||
* @brief Initializes System Driver
|
|
||||||
*
|
|
||||||
* This function initializes the System driver.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
void systemInit(void)
|
void systemInit(void)
|
||||||
{
|
{
|
||||||
/** @b Initialize @b Flash @b Wrapper: */
|
/** @b Initialize @b Flash @b Wrapper: */
|
||||||
|
|
||||||
/** - Setup flash read mode, address wait states and data wait states */
|
/** - Setup flash read mode, address wait states and data wait states */
|
||||||
|
#if startupCPU_100MHZ == 1
|
||||||
|
/* 100MHz */
|
||||||
|
flashWREG->FRDCNTL = 0x01000000U
|
||||||
|
| (2U << 8U)
|
||||||
|
| (0U << 4U)
|
||||||
|
| 1U;
|
||||||
|
#else
|
||||||
|
/* 180MHz */
|
||||||
flashWREG->FRDCNTL = 0x01000000U
|
flashWREG->FRDCNTL = 0x01000000U
|
||||||
| (3U << 8U)
|
| (3U << 8U)
|
||||||
| (1U << 4U)
|
| (1U << 4U)
|
||||||
| 1U;
|
| 1U;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/** - Setup flash bank power modes */
|
/** - Setup flash bank power modes */
|
||||||
|
@ -77,6 +79,15 @@ void systemInit(void)
|
||||||
* - Setup Pll multiplier
|
* - Setup Pll multiplier
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if startupCPU_100MHZ == 1
|
||||||
|
/* 100MHz */
|
||||||
|
systemREG1->PLLCTL1 = 0x00000000U
|
||||||
|
| 0x20000000U
|
||||||
|
| (0U << 24U)
|
||||||
|
| 0x00000000U
|
||||||
|
| (5U << 16U)
|
||||||
|
| (74U << 8U);
|
||||||
|
#else
|
||||||
/* 180Mhz */
|
/* 180Mhz */
|
||||||
systemREG1->PLLCTL1 = 0x00000000U
|
systemREG1->PLLCTL1 = 0x00000000U
|
||||||
| 0x20000000U
|
| 0x20000000U
|
||||||
|
@ -84,6 +95,7 @@ void systemInit(void)
|
||||||
| 0x00000000U
|
| 0x00000000U
|
||||||
| (5U << 16U)
|
| (5U << 16U)
|
||||||
| (134U << 8U);
|
| (134U << 8U);
|
||||||
|
#endif
|
||||||
|
|
||||||
/** - Setup pll control register 1
|
/** - Setup pll control register 1
|
||||||
* - Enable/Disable frequency modulation
|
* - Enable/Disable frequency modulation
|
||||||
|
@ -131,6 +143,7 @@ void systemInit(void)
|
||||||
| 1U;
|
| 1U;
|
||||||
|
|
||||||
/** - Setup RTICLK1 and RTICLK2 clocks */
|
/** - Setup RTICLK1 and RTICLK2 clocks */
|
||||||
|
/* 90MHz (180Mhz/2) */
|
||||||
systemREG1->RCLKSRC = (1U << 24U)
|
systemREG1->RCLKSRC = (1U << 24U)
|
||||||
| (SYS_VCLK << 16U)
|
| (SYS_VCLK << 16U)
|
||||||
| (1U << 8U)
|
| (1U << 8U)
|
||||||
|
|
Loading…
Reference in a new issue