Update repo
This commit is contained in:
1 parent
749dab5721
commit
ce65a0f59a
14950 files changed
+4408250
-1
No files matched your search
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="dcc_ex1_single_shot_verification"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../dcc_ex1_single_shot_verification.c" targetDirectory="" />
|
||||
<file action="copy" path="../../empty_projects/c2000.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="dcc_ex2_single_shot_measurement"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../dcc_ex2_single_shot_measurement.c" targetDirectory="" />
|
||||
<file action="copy" path="../../empty_projects/c2000.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="dcc_ex3_continuous_monitoring_of_clock"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../dcc_ex3_continuous_monitoring_of_clock.c" targetDirectory="" />
|
||||
<file action="copy" path="../../empty_projects/c2000.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="dcc_ex3_continuous_monitoring_of_clock_syscfg"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../dcc_ex3_continuous_monitoring_of_clock_syscfg.c" targetDirectory="" />
|
||||
<file action="copy" path="../dcc_ex3_continuous_monitoring_of_clock_syscfg.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="dcc_ex4_clock_fail_detect"
|
||||
device="TMS320F28388D"
|
||||
cgtVersion="22.6.1.LTS"
|
||||
products="sysconfig;C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
enableSysConfigTool="true"
|
||||
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
|
||||
postBuildStep="
|
||||
echo "========= Build of the CLB simulation has moved to the CLB Tool. Click the '?' icon by the _Generate CLB Simulation File_ enable for more details (located in the Global Parameters of the Tile Design SysConfig module) ============="
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/dot_file_libraries/clbDotUtility.js" "${C2000WARE_ROOT}/utilities/clb_tool/clb_syscfg/" "${BuildDirectory}/syscfg" "${BuildDirectory}/syscfg/clb.dot"
|
||||
;if ${GENERATE_DIAGRAM} == 1 mkdir "${BuildDirectory}/diagrams"
|
||||
;if ${GENERATE_DIAGRAM} == 1 ${NODE_TOOL} "${C2000WARE_ROOT}/driverlib/.meta/generate_diagrams.js" "${C2000WARE_ROOT}" "${BuildDirectory}/diagrams" "${BuildDirectory}/syscfg"
|
||||
"
|
||||
>
|
||||
<configuration name="CPU1_RAM" compilerBuildOptions= "--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -v28 -ml -mt --cla_support=cla2 --define=RAM --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=RAM -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${C2000WARE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} --define=_FLASH -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 --define=DEBUG --define=CPU1 --gen_func_subsections=on --diag_warning=225 --diag_suppress=10063" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define=_FLASH -i${C2000WARE_ROOT} -i${PROJECT_BUILD_DIR}/syscfg -lc2000ware_libraries.cmd.genlibs " />
|
||||
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
|
||||
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
|
||||
<pathVariable name="CLB_SYSCFG_ROOT" path="../../../../../../utilities/clb_tool/clb_syscfg/" scope="project" />
|
||||
<pathVariable name="SYSTEMC_INSTALL" path="../../../../../../utilities/clb_tool/clb_syscfg/systemc-2.3.3" scope="project" />
|
||||
<pathVariable name="CLB_SIM_COMPILER" path="C:/TDM-GCC-64/bin" scope="project" />
|
||||
<buildVariable name="GENERATE_DIAGRAM" value="0" scope="project" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
|
||||
<file action="copy" path="../../../../../../device_support/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
|
||||
<file action="link" path="../../../../../../driverlib/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="../../../../../../driverlib/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
<file action="copy" path="../dcc_ex4_clock_fail_detect.c" targetDirectory="" />
|
||||
<file action="copy" path="../../empty_projects/c2000.syscfg" targetDirectory="" />
|
||||
</project>
|
||||
</projectSpec>
|
||||
@@ -0,0 +1,140 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: dcc_ex1_single_shot_verification.c
|
||||
//
|
||||
// TITLE: DCC Single shot Clock verification
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>DCC Single shot Clock verification</h1>
|
||||
//!
|
||||
//! This program uses the XTAL clock as a reference clock to verify
|
||||
//! the frequency of the PLLRAW clock.
|
||||
//!
|
||||
//! The Dual-Clock Comparator Module 0 is used for the clock verification.
|
||||
//! The clocksource0 is the reference clock (Fclk0 = 25Mhz) and the
|
||||
//! clocksource1 is the clock that needs to be verified (Fclk1 = 200Mhz).
|
||||
//! Seed is the value that gets loaded into the Counter.
|
||||
//!
|
||||
//! Please refer to the TRM for details on counter seed values to be set.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - \b status/result - Status of the PLLRAW clock verification
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define PASS 0
|
||||
#define FAIL 1
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
uint32_t result = FAIL;
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
bool status=0;
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Verify the frequency of PLL clock using the XTAL as reference clock
|
||||
// FClk1 = PLL frequency = 200MHz
|
||||
// FClk0 = XTAL frequency = 25MHz
|
||||
// Tolerance = 1%
|
||||
// Allowable Frequency Tolerance = 0% (update as per the error in the XTAL frequency)
|
||||
// SysClk Freq = 200MHz
|
||||
//
|
||||
// Note: Update the parameters in case you are using different PLL or XTAL
|
||||
// frequencies,
|
||||
//
|
||||
status = DCC_verifyClockFrequency(DCC0_BASE,
|
||||
DCC_COUNT1SRC_PLL, 200.0F,
|
||||
DCC_COUNT0SRC_XTAL, 25.0F,
|
||||
1.0F, 0.0F, 200.0F);
|
||||
|
||||
//
|
||||
// Status of the PLLRAW clock verification
|
||||
//
|
||||
if (!status)
|
||||
{
|
||||
result = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = PASS;
|
||||
}
|
||||
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: dcc_ex2_single_shot measurement.c
|
||||
//
|
||||
// TITLE: DCC Single shot Clock measurement
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>DCC Single shot Clock measurement</h1>
|
||||
//!
|
||||
//! This program demonstrates Single Shot measurement of the INTOSC2
|
||||
//! clock post trim using XTAL as the reference clock.
|
||||
//!
|
||||
//! The Dual-Clock Comparator Module 0 is used for the clock measurement.
|
||||
//! The clocksource0 is the reference clock (Fclk0 = 25Mhz) and the
|
||||
//! clocksource1 is the clock that needs to be measured (Fclk1 = 10Mhz).
|
||||
//! Since the frequency of the clock1 needs to be measured an initial seed is
|
||||
//! set to the max value of the counter.
|
||||
//!
|
||||
//! Please refer to the TRM for details on counter seed values to be set.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - \b result - Status if the INTOSC2 clock measurement
|
||||
//! completed successfully.
|
||||
//! - \b meas_freq1 - measured clock frequency, in this case for INTOSC2.
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define PASS 0
|
||||
#define FAIL 1
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
uint32_t result = FAIL;
|
||||
float32_t meas_freq1 = 0.0F;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
// Initialize PIE and clear PIE registers. Disables CPU interrupts.
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
// Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
// Service Routines (ISR).
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Measure the frequency of INTOSC2 using XTAL as reference clock
|
||||
// Clk1 = INTOSC2
|
||||
// CLk2 = XTAL (Frequency = 25MHz)
|
||||
// Tolerance = 1%
|
||||
// Allowable Frequency Tolerance = 0% (update as per the error in the XTAL frequency)
|
||||
// SysClk Freq = 200MHz
|
||||
//
|
||||
meas_freq1 = DCC_measureClockFrequency(DCC0_BASE,
|
||||
DCC_COUNT1SRC_INTOSC2,
|
||||
DCC_COUNT0SRC_XTAL, 25.0F,
|
||||
1.0F, 0.0F, 200.0F);
|
||||
|
||||
//
|
||||
// Measured clock frequency of INTOSC2.
|
||||
// Value of INTOSC2 freq can be checked in the device datasheet
|
||||
//
|
||||
if ((meas_freq1 >= 9.7F) && (meas_freq1 <= 10.3F))
|
||||
{
|
||||
result = PASS;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = FAIL;
|
||||
}
|
||||
|
||||
ESTOP0;
|
||||
}
|
||||
+329
@@ -0,0 +1,329 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: dcc_ex3_continuous_monitoring_of_clock.c
|
||||
//
|
||||
// TITLE: DCC Continuous clock monitoring
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>DCC Continuous clock monitoring</h1>
|
||||
//!
|
||||
//! This program demonstrates continuous monitoring of PLL Clock in the
|
||||
//! system using INTOSC2 as the reference clock. This would trigger an
|
||||
//! interrupt on any error, causing the decrement/ reload of counters to
|
||||
//! stop.
|
||||
//!
|
||||
//! The Dual-Clock Comparator Module 0 is used for the clock monitoring.
|
||||
//! The clocksource0 is the reference clock (Fclk0 = 10Mhz) and the
|
||||
//! clocksource1 is the clock that needs to be monitored (Fclk1 = 200Mhz).
|
||||
//! The clock0 and clock1 seed are set to achieve a window of 500us.
|
||||
//! Seed is the value that gets loaded into the Counter.
|
||||
//! For the sake of demo a slight variance is given to clock1 seed value
|
||||
//! to generate an error on continuous monitoring.
|
||||
//!
|
||||
//! Please refer to the TRM for details on counter seed values to be set.
|
||||
//! Note : When running in flash configuration it is good to do a reset
|
||||
//! & restart after loading the example to remove any stale flags/states.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - \b status/result - Status of the PLLRAW clock monitoring
|
||||
//! - \b cnt0 - Counter0 Value measure when error is generated
|
||||
//! - \b cnt1 - Counter1 Value measure when error is generated
|
||||
//! - \b valid - Valid0 Value measure when error is generated
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define PASS 0
|
||||
#define FAIL 1
|
||||
|
||||
//
|
||||
// Calculating Counter0 & Valid Seed Value with +/-1% tolerance.
|
||||
// INTOSC2 has frequency variance of +/-3%
|
||||
//
|
||||
// If Fclk1>Fclk0, Async. Error (In Clock0 cycles) = 2 + 2*(Fsysclk/Fclk0) = 42
|
||||
// Digitization error (In Clock0 cycles) = 8
|
||||
// DCC Error = Async. Error + Digitization error = 50
|
||||
//
|
||||
// Window (in Cycles) = (DCC Error) / (0.01 * Tolerance)
|
||||
// Window = 50 / (0.01 * 1) = 5000
|
||||
//
|
||||
// Frequency Error Allowed (In Clock0 Cycles)
|
||||
// = Window * (Allowable Frequency Tolerance (in %) / 100)
|
||||
// = 5000 * (3/100) = 150
|
||||
//
|
||||
// Total Error = DCC Error + Frequency Error Allowed = 50 + 150 = 200
|
||||
//
|
||||
// Counter0 = Window - Total Error = 5000 - 200 = 4800
|
||||
// Valid0 = 2 * Total Error = 2 * 200 = 400
|
||||
// Counter1 = Window x (Fclk1/Fclk0) = 5000 * (200/10) = 100000
|
||||
//
|
||||
// To simulate an error, we are configuring count1 seed value as 110000.
|
||||
//
|
||||
// Note : Update the values if you are using a different PLL frequency
|
||||
//
|
||||
#define VALID 400
|
||||
#define COUNT0 4800
|
||||
#define COUNT1 110000 // Set with a variance of 10000 counts over 100000
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
uint32_t result = FAIL, pass_base = 0 , isr_enter = 0;
|
||||
uint32_t cnt0 = 0,cnt1 = 0,valid = 0;
|
||||
uint16_t sysIntFlagGlobal = 0;
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
bool DCC_Continuous_StopOnError(uint32_t base,
|
||||
DCC_Count0ClockSource clk0src,
|
||||
DCC_Count1ClockSource clk1src,
|
||||
uint32_t dccCounterSeed0,
|
||||
uint32_t dccCounterSeed1,
|
||||
uint32_t dccValidSeed0);
|
||||
|
||||
__interrupt void DCC_ISR();
|
||||
|
||||
void main(void)
|
||||
{
|
||||
bool status;
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
//Initialize PIE and clear PIE registers. Disables CPU interrupts
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
//Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
//Service Routines (ISR)
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Clear Error & Done Flag
|
||||
//
|
||||
DCC_clearErrorFlag(DCC0_BASE);
|
||||
DCC_clearDoneFlag(DCC0_BASE);
|
||||
|
||||
//
|
||||
// Clear any stale interrupt status
|
||||
//
|
||||
sysIntFlagGlobal = SysCtl_getInterruptStatus();
|
||||
SysCtl_clearInterruptStatus(sysIntFlagGlobal);
|
||||
|
||||
//
|
||||
// Interrupts that are used in this example are re-mapped to ISR functions
|
||||
// found within this file.
|
||||
//
|
||||
Interrupt_register(INT_SYS_ERR, &DCC_ISR);
|
||||
|
||||
//
|
||||
// Enable interrupts required for this example
|
||||
//
|
||||
Interrupt_enable(INT_SYS_ERR);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Pass calculated counter seed values to monitor the clock
|
||||
//
|
||||
status = DCC_Continuous_StopOnError(DCC0_BASE,
|
||||
DCC_COUNT0SRC_INTOSC2,
|
||||
DCC_COUNT1SRC_PLL,
|
||||
COUNT0, COUNT1, VALID);
|
||||
|
||||
//
|
||||
// Status of the PLL clock measurement
|
||||
//
|
||||
if (!status)
|
||||
{
|
||||
result = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = PASS;
|
||||
}
|
||||
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
//
|
||||
// Function to continuously monitor a clock
|
||||
//
|
||||
bool DCC_Continuous_StopOnError(uint32_t base,
|
||||
DCC_Count0ClockSource clk0src,
|
||||
DCC_Count1ClockSource clk1src,
|
||||
uint32_t dccCounterSeed0,
|
||||
uint32_t dccCounterSeed1,
|
||||
uint32_t dccValidSeed0)
|
||||
{
|
||||
|
||||
pass_base = base;
|
||||
|
||||
//
|
||||
// Clear Error & Done Flag
|
||||
//
|
||||
DCC_clearErrorFlag(base);
|
||||
DCC_clearDoneFlag(base);
|
||||
|
||||
//
|
||||
// Disable DCC
|
||||
//
|
||||
DCC_disableModule(base);
|
||||
|
||||
//
|
||||
// Disable Error Signal
|
||||
//
|
||||
DCC_disableErrorSignal(base);
|
||||
|
||||
//
|
||||
// Disable Done Signal
|
||||
//
|
||||
DCC_disableDoneSignal(base);
|
||||
|
||||
//
|
||||
// Configure Clock Source0 to the reference clock
|
||||
// source for PLL
|
||||
//
|
||||
DCC_setCounter0ClkSource(base, clk0src);
|
||||
|
||||
//
|
||||
// Configure Clock Source1 to PLL
|
||||
//
|
||||
DCC_setCounter1ClkSource(base, clk1src);
|
||||
|
||||
//
|
||||
// Configure COUNTER-0, COUNTER-1 & Valid Window
|
||||
//
|
||||
DCC_setCounterSeeds(base, dccCounterSeed0, dccValidSeed0,
|
||||
dccCounterSeed1);
|
||||
|
||||
//
|
||||
// Enable Continuous mode
|
||||
//
|
||||
DCC_disableSingleShotMode(base);
|
||||
|
||||
//
|
||||
// Enable Error Signal
|
||||
//
|
||||
DCC_enableErrorSignal(base);
|
||||
|
||||
//
|
||||
// Enable DCC to start counting
|
||||
//
|
||||
DCC_enableModule(base);
|
||||
|
||||
//
|
||||
// Wait for a window of about 1000uS to detect if an error
|
||||
// is generated and ISR is triggered
|
||||
//
|
||||
DEVICE_DELAY_US(1000);
|
||||
|
||||
//
|
||||
// Check if ISR was triggered due to error
|
||||
//
|
||||
if (isr_enter != 1)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// DCC ISR triggered on an error
|
||||
//
|
||||
__interrupt void DCC_ISR()
|
||||
{
|
||||
uint32_t base;
|
||||
|
||||
//
|
||||
// Pass the DCC base address to the ISR
|
||||
//
|
||||
base = pass_base;
|
||||
|
||||
//
|
||||
// Shows that the ISR was called
|
||||
//
|
||||
isr_enter = 1;
|
||||
|
||||
if (DCC_getErrorStatus(base) == 1U)
|
||||
{
|
||||
//
|
||||
// Dump the DCC counters into RAM
|
||||
//
|
||||
cnt0 = DCC_getCounter0Value(base);
|
||||
cnt1 = DCC_getCounter1Value(base);
|
||||
valid = DCC_getValidCounter0Value(base);
|
||||
|
||||
//
|
||||
// Clear the Error flag
|
||||
//
|
||||
DCC_clearErrorFlag(base);
|
||||
}
|
||||
|
||||
//
|
||||
// Clear the interrupt at PIE level
|
||||
//
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
|
||||
}
|
||||
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
//#############################################################################
|
||||
// FILE: dcc_ex3_continuous_monitoring_of_clock_syscfg.c
|
||||
//
|
||||
// TITLE: DCC Continuous clock monitoring with sysconfig
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>DCC Continuous clock monitoring</h1>
|
||||
//!
|
||||
//! This program demonstrates continuous monitoring of PLL Clock in the
|
||||
//! system using INTOSC2 as the reference clock. This would trigger an
|
||||
//! interrupt on any error, causing the decrement/ reload of counters to
|
||||
//! stop.
|
||||
//! The Dual-Clock Comparator Module 0 is used for the clock monitoring.
|
||||
//! The clocksource0 is the reference clock (Fclk0 = 10Mhz) and the
|
||||
//! clocksource1 is the clock that needs to be monitored (Fclk1 = 200Mhz).
|
||||
//! The clock0 and clock1 seed are set automatically by the error tolerances
|
||||
//! defined in the sysconfig file included this project.
|
||||
//! For the sake of demo an un-realistic tolerance is assumed
|
||||
//! to generate an error on continuous monitoring.
|
||||
//!
|
||||
//! Please refer to the TRM for details on counter seed values to be set.
|
||||
//! Note : When running in flash configuration it is good to do a reset
|
||||
//! & restart after loading the example to remove any stale flags/states.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - \b status/result - Status of the PLLRAW clock monitoring
|
||||
//! - \b cnt0 - Counter0 Value measure when error is generated
|
||||
//! - \b cnt1 - Counter1 Value measure when error is generated
|
||||
//! - \b valid - Valid0 Value measure when error is generated
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: $
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
#include "board.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define PASS 0
|
||||
#define FAIL 1
|
||||
|
||||
//
|
||||
// SysConfig Contains the assumptions for the DCC error tolerances
|
||||
// This example uses the internal oscillator2 clock source(Fclk0) to measure the accuracy of the PLL(Fclk1)
|
||||
// In this scenario SysClk is the same as the Fclk1
|
||||
// DCC Error Tolerance is set to 1%
|
||||
// Frequency Error Tolerance is set to 3% due to the spec of the internal oscillator
|
||||
// These assumptions are slightly optimistic in order for the example to trigger a DCC error
|
||||
// Error Signal is enabled to trigger the DCC ISR
|
||||
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
uint32_t result = FAIL, pass_base = myDCC0_BASE , isr_enter = 0;
|
||||
uint32_t cnt0 = 0,cnt1 = 0,valid = 0;
|
||||
|
||||
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
//Initialize PIE and clear PIE registers. Disables CPU interrupts
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
//Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
//Service Routines (ISR)
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
//Call Board_init() to invoke the Sysconfig controlled settings
|
||||
//
|
||||
Board_init();
|
||||
|
||||
//
|
||||
// Enable Global Interrupts
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
|
||||
//
|
||||
//Start the DCC timers
|
||||
//
|
||||
DCC_enableModule(myDCC0_BASE);
|
||||
|
||||
//
|
||||
//Allow time for the dcc module to complete
|
||||
//
|
||||
DEVICE_DELAY_US(1000);
|
||||
|
||||
//
|
||||
// Status of the PLL clock measurement
|
||||
//
|
||||
if (isr_enter)
|
||||
{
|
||||
result = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = PASS;
|
||||
}
|
||||
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// DCC ISR triggered on an error
|
||||
//
|
||||
__interrupt void INT_myDCC0_ISR()
|
||||
{
|
||||
uint32_t base;
|
||||
|
||||
//
|
||||
// Pass the DCC base address to the ISR
|
||||
//
|
||||
base = pass_base;
|
||||
|
||||
//
|
||||
// Shows that the ISR was called
|
||||
//
|
||||
isr_enter = 1;
|
||||
|
||||
if (DCC_getErrorStatus(base) == 1U)
|
||||
{
|
||||
//
|
||||
// Dump the DCC counters into RAM
|
||||
//
|
||||
cnt0 = DCC_getCounter0Value(base);
|
||||
cnt1 = DCC_getCounter1Value(base);
|
||||
valid = DCC_getValidCounter0Value(base);
|
||||
|
||||
//
|
||||
// Clear the Error flag
|
||||
//
|
||||
DCC_clearErrorFlag(base);
|
||||
}
|
||||
|
||||
//
|
||||
// Clear the interrupt at PIE level
|
||||
//
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
|
||||
}
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Import the modules used in this configuration.
|
||||
*/
|
||||
const dcc = scripting.addModule("/driverlib/dcc.js", {}, false);
|
||||
const dcc1 = dcc.addInstance();
|
||||
|
||||
/**
|
||||
* Write custom configuration values to the imported modules.
|
||||
*/
|
||||
dcc1.$name = "myDCC0";
|
||||
dcc1.freqerrtol = 3;
|
||||
dcc1.dccerrtol = 1;
|
||||
dcc1.setCounter0ClkSource = "DCC_COUNT0SRC_INTOSC2";
|
||||
dcc1.enableInterrupts = true;
|
||||
dcc1.enableErrorSignalInterrupt = true;
|
||||
dcc1.registerInterrupts = true;
|
||||
|
||||
const interrupt_sys_err = scripting.addModule("/driverlib/interrupt/interrupt_sys_err.js", {}, false);
|
||||
const interrupt_sys_err1 = interrupt_sys_err.addInstance({}, false);
|
||||
interrupt_sys_err1.$name = "myInterruptSysErr0";
|
||||
dcc1.sysErrInt = interrupt_sys_err1;
|
||||
interrupt_sys_err1.enableInterrupt = true;
|
||||
interrupt_sys_err1.sysErrSource_SYSCTL_STATUS_DCC1 = true;
|
||||
interrupt_sys_err1.interruptHandler = "INT_myDCC0_ISR";
|
||||
@@ -0,0 +1,245 @@
|
||||
//#############################################################################
|
||||
//
|
||||
// FILE: dcc_ex4_clock_fail_detect.c
|
||||
//
|
||||
// TITLE: DCC Clock Fail Detection
|
||||
//
|
||||
//! \addtogroup driver_example_list
|
||||
//! <h1>DCC Detection of clock failure</h1>
|
||||
//!
|
||||
//! This program demonstrates clock failure detection on continuous
|
||||
//! monitoring of the PLL Clock in the system using XTAL as the osc
|
||||
//! clock source. Once the oscillator clock fails, it would trigger
|
||||
//! a DCC error interrupt, causing the decrement/ reload of counters
|
||||
//! to stop. In this examples, the clock failure is simulated by
|
||||
//! turning off the XTAL oscillator. Once the ISR is serviced, the
|
||||
//! osc source is changed to INTOSC1 and the PLL is turned off.
|
||||
//!
|
||||
//! The Dual-Clock Comparator Module 0 is used for the clock monitoring.
|
||||
//! The clocksource0 is the reference clock (Fclk0 = 25Mhz) and the
|
||||
//! clocksource1 is the clock that needs to be monitored (Fclk1 = 200Mhz).
|
||||
//! Seed is the value that gets loaded into the Counter.
|
||||
//!
|
||||
//! \note In the current example, the XTAL is expected to be a Resonator
|
||||
//! running in Crystal mode which is later switched off to simulate the clock
|
||||
//! failure. If an SE Crystal is used, you will need to physically disconnect
|
||||
//! the clock on the board.
|
||||
//!
|
||||
//! Please refer to the TRM for details on counter seed values to be set.
|
||||
//! Note : When running in flash configuration it is good to do a reset
|
||||
//! & restart after loading the example to remove any stale flags/states.
|
||||
//!
|
||||
//! \b External \b Connections \n
|
||||
//! - None
|
||||
//!
|
||||
//! \b Watch \b Variables \n
|
||||
//! - \b status/result - Status of the clock failure detection
|
||||
//!
|
||||
//
|
||||
//#############################################################################
|
||||
//
|
||||
//
|
||||
//
|
||||
// C2000Ware v5.04.00.00
|
||||
//
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "driverlib.h"
|
||||
#include "device.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define PASS 0
|
||||
#define FAIL 1
|
||||
|
||||
//
|
||||
// Globals
|
||||
//
|
||||
uint32_t result = FAIL, isr_enter = 0;
|
||||
uint16_t pass= 0;
|
||||
uint16_t sysIntFlagGlobal = 0;
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
__interrupt void DCC_ISR();
|
||||
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
// Initialize device clock and peripherals
|
||||
//
|
||||
Device_init();
|
||||
|
||||
//
|
||||
//Initialize PIE and clear PIE registers. Disables CPU interrupts
|
||||
//
|
||||
Interrupt_initModule();
|
||||
|
||||
//
|
||||
//Initialize the PIE vector table with pointers to the shell Interrupt
|
||||
//Service Routines (ISR)
|
||||
//
|
||||
Interrupt_initVectorTable();
|
||||
|
||||
//
|
||||
// Clear Error & Done Flag
|
||||
//
|
||||
DCC_clearErrorFlag(DCC0_BASE);
|
||||
DCC_clearDoneFlag(DCC0_BASE);
|
||||
|
||||
//
|
||||
// Clear any stale interrupt status
|
||||
//
|
||||
sysIntFlagGlobal = SysCtl_getInterruptStatus();
|
||||
SysCtl_clearInterruptStatus(sysIntFlagGlobal);
|
||||
|
||||
//
|
||||
// Interrupts that are used in this example are re-mapped to ISR functions
|
||||
// found within this file.
|
||||
//
|
||||
Interrupt_register(INT_SYS_ERR, &DCC_ISR);
|
||||
|
||||
//
|
||||
// Enable interrupts required for this example
|
||||
//
|
||||
Interrupt_enable(INT_SYS_ERR);
|
||||
|
||||
//
|
||||
// Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
|
||||
//
|
||||
EINT;
|
||||
ERTM;
|
||||
|
||||
//
|
||||
// Continuous monitor of PLL clock using XTAL as reference clock
|
||||
// CLk1 = PLL (Frequency = 200MHz)
|
||||
// CLk0 = XTAL (Frequency = 25MHz)
|
||||
// Tolerance = 1%
|
||||
// Allowable Frequency Tolerance = 0% (update as per the error in the XTAL frequency)
|
||||
// SysClk Freq = 200MHz
|
||||
//
|
||||
// Note: Update the parameters in case you re using different PLL or XTAL
|
||||
// frequencies,
|
||||
//
|
||||
DCC_continuousMonitor(DCC0_BASE,
|
||||
DCC_COUNT1SRC_PLL, 200.0F,
|
||||
DCC_COUNT0SRC_XTAL, 25.0F,
|
||||
1.0F, 0.0F, 200.0F);
|
||||
|
||||
//
|
||||
// Disable MCD to prevent NMI generation due to missing clock
|
||||
// MCD to be handled by the DCC
|
||||
//
|
||||
SysCtl_disableMCD();
|
||||
|
||||
//
|
||||
// Turn off XTAL to simulate a missing clock
|
||||
//
|
||||
EALLOW;
|
||||
HWREGH(CLKCFG_BASE + SYSCTL_O_XTALCR) |= SYSCTL_XTALCR_OSCOFF;
|
||||
EDIS;
|
||||
|
||||
//
|
||||
// Wait till the ISR is hit on clock failure
|
||||
//
|
||||
while(isr_enter != 0x1U);
|
||||
|
||||
//
|
||||
// Configure oscillator source to INTOSC1
|
||||
//
|
||||
SysCtl_selectOscSource(SYSCTL_OSCSRC_OSC1);
|
||||
|
||||
//
|
||||
// Delay of at least 60 OSCCLK cycles
|
||||
//
|
||||
SysCtl_delay(11U);
|
||||
|
||||
//
|
||||
// Turn off PLL
|
||||
//
|
||||
EALLOW;
|
||||
HWREGH(CLKCFG_BASE + SYSCTL_O_SYSPLLCTL1) &=
|
||||
~SYSCTL_SYSPLLCTL1_PLLEN;
|
||||
EDIS;
|
||||
|
||||
//
|
||||
// Delay of at least 66 OSCCLK cycles required post
|
||||
// powerdown of PLL
|
||||
//
|
||||
SysCtl_delay(12U);
|
||||
|
||||
//
|
||||
// Status of the clock failure detection
|
||||
//
|
||||
if (pass == 0)
|
||||
{
|
||||
result = FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = PASS;
|
||||
}
|
||||
|
||||
ESTOP0;
|
||||
}
|
||||
|
||||
//
|
||||
// DCC ISR triggered on an error
|
||||
//
|
||||
__interrupt void DCC_ISR()
|
||||
{
|
||||
//
|
||||
// Shows that the ISR was called
|
||||
//
|
||||
isr_enter = 1;
|
||||
|
||||
//
|
||||
// A clock failure was detected
|
||||
//
|
||||
pass++;
|
||||
|
||||
if (DCC_getErrorStatus(DCC0_BASE) == 1U)
|
||||
{
|
||||
//
|
||||
// Clear the Error flag
|
||||
//
|
||||
DCC_clearErrorFlag(DCC0_BASE);
|
||||
}
|
||||
|
||||
Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user