Update repo

This commit is contained in:
hangpersonal committed 2026-08-30 23:04:35 -07:00
1 parent 749dab5721
commit ce65a0f59a
14950 files changed
+4408250 -1

No files matched your search

@@ -0,0 +1,35 @@
<projectSpec>
<project
name="f280015x_pmbus_controller_example"
device="TMS320F2800157"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F280015x --package 80PN --part F280015x_80PN"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f280015x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f280015x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f280015x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F2800157.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f280015x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F280015x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f280015x/pmbus_controller.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f280015x_pmbus_over_i2c_controller_example"
device="TMS320F2800157"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f280015x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f280015x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f280015x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F2800157.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f280015x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F280015x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True"/>
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f280015x_pmbus_over_i2c_target_example"
device="TMS320F2800157"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f280015x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f280015x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f280015x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F2800157.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f280015x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F280015x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,36 @@
<projectSpec>
<project
name="f280015x_pmbus_target_example"
device="TMS320F2800157"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F280015x --package 80PN --part F280015x_80PN"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f280015x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f280015x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f280015x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f280015x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/280015x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F2800157.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f280015x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F280015x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f280015x/pmbus_target.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,35 @@
<projectSpec>
<project
name="f28002x_pmbus_controller_example"
device="TMS320F280025C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28002x --package 80QFP --part F28002x_80QFP"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28002x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28002x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28002x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280025C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28002x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28002x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28002x/pmbus_controller.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28002x_pmbus_over_i2c_controller_example"
device="TMS320F280025C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28002x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28002x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28002x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280025C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28002x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28002x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28002x_pmbus_over_i2c_target_example"
device="TMS320F280025C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28002x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28002x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28002x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280025C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28002x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28002x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,35 @@
<projectSpec>
<project
name="f28002x_pmbus_target_example"
device="TMS320F280025C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28002x --package 80QFP --part F28002x_80QFP"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28002x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28002x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28002x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28002x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28002x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280025C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28002x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28002x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28002x/pmbus_target.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,35 @@
<projectSpec>
<project
name="f28003x_pmbus_controller_example"
device="TMS320F280039C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28003x --package 100PZ --part F28003x_100PZ"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28003x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28003x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28003x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280039C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28003x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28003x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28003x/pmbus_controller.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28003x_pmbus_over_i2c_controller_example"
device="TMS320F280039C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28003x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28003x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28003x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280039C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28003x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28003x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True"/>
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28003x_pmbus_over_i2c_target_example"
device="TMS320F280039C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28003x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28003x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28003x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280039C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28003x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28003x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,36 @@
<projectSpec>
<project
name="f28003x_pmbus_target_example"
device="TMS320F280039C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28003x --package 100PZ --part F28003x_100PZ"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28003x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28003x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28003x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28003x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28003x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280039C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28003x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28003x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28003x/pmbus_target.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,36 @@
<projectSpec>
<project
name="f28004x_pmbus_controller_example"
device="TMS320F280049C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28004x --package F28004x_100PZ --part F28004x_100PZ"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28004x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28004x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28004x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280049C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28004x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28004x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28004x/pmbus_controller.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,33 @@
<projectSpec>
<project
name="28004x_pmbus_i2c_eeprom"
device="TMS320F280049C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -ml -mt --define=DEBUG --define=PMBUS_F28004x -v28 --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define RAM" />
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -ml -mt --define=DEBUG --define=PMBUS_F28004x --define=_FLASH -v28 --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 " />
<configuration name="CPU1_LAUNCHXL_RAM" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -ml -mt --define=DEBUG --define=PMBUS_F28004x --define=_LAUNCHXL_F280049C -v28 --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define RAM" />
<configuration name="CPU1_LAUNCHXL_FLASH" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -ml -mt --define=DEBUG --define=PMBUS_F28004x --define=_LAUNCHXL_F280049C --define=_FLASH -v28 --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 " />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28004x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28004x/driverlib/" scope="project" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/device.c" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28004x_codestartbranch.asm" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280049C.ccxml" targetDirectory="targetConfigs" applicableConfigurations="CPU1_RAM,CPU1_FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280049C_LaunchPad.ccxml" targetDirectory="targetConfigs" applicableConfigurations="CPU1_LAUNCHXL_RAM,CPU1_LAUNCHXL_FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM,CPU1_LAUNCHXL_RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH,CPU1_LAUNCHXL_FLASH" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True"/>
<file action="copy" path="../common/source/pmbus_i2c_eeprom_example_main.c" targetDirectory="" />
<file action="copy" path="../common/source/pmbus_eeprom.c" targetDirectory="" />
<file action="copy" path="../common/include/pmbus_eeprom.h" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28004x_pmbus_over_i2c_controller_example"
device="TMS320F280049C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28004x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28004x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28004x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280049C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28004x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28004x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28004x_pmbus_over_i2c_target_example"
device="TMS320F280049C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=PMBUS_OVER_I2C --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28004x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28004x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28004x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280049C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28004x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28004x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,36 @@
<projectSpec>
<project
name="f28004x_pmbus_target_example"
device="TMS320F280049C"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28004x --package F28004x_100PZ --part F28004x_100PZ"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28004x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28004x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28004x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28004x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28004x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F280049C.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28004x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28004x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28004x/pmbus_target.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,35 @@
<projectSpec>
<project
name="f2838x_pmbus_controller_example"
device="TMS320F28388D"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_RAM --define=CPU1 --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_FLASH --define=CPU1 --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f2838x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f2838x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F2838x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f2838x/pmbus_controller.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,30 @@
<projectSpec>
<project
name="2838x_pmbus_i2c_eeprom"
device="TMS320F28388D"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -ml -mt --define=DEBUG --define=PMBUS_F2838x --define=CPU1 -v28 --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 --define RAM" />
<configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -ml -mt --define=DEBUG --define=PMBUS_F2838x --define=CPU1 --define=_FLASH -v28 --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu0 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x3F8 --heap_size=0x200 " />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f2838x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/device.c" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f2838x_codestartbranch.asm" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="targetConfigs" applicableConfigurations="CPU1_RAM,CPU1_FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True"/>
<file action="copy" path="../common/source/pmbus_i2c_eeprom_example_main.c" targetDirectory="" />
<file action="copy" path="../common/source/pmbus_eeprom.c" targetDirectory="" />
<file action="copy" path="../common/include/pmbus_eeprom.h" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f2838x_pmbus_over_i2c_controller_example"
device="TMS320F28388D"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=CPU1 --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=CPU1 --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f2838x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f2838x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F2838x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f2838x_pmbus_over_i2c_target_example"
device="TMS320F28388D"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=CPU1 --define=_RAM --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=CPU1 --define=_FLASH --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f2838x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f2838x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F2838x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,36 @@
<projectSpec>
<project
name="f2838x_pmbus_target_example"
device="TMS320F28388D"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2838x --package 337bga --part F2838x_337bga"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --define=CPU1 --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f2838x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --define=CPU1 --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f2838x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f2838x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f2838x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F2838x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f2838x/pmbus_target.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,35 @@
<projectSpec>
<project
name="f28p55x_pmbus_controller_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28P55x --package 128PDT --part F28P55x_128PDT"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p55x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p55x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p55x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P550SJ9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p55x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P55x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28p55x/pmbus_controller.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28p55x_pmbus_over_i2c_controller_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p55x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p55x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p55x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P550SJ9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p55x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P55x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True"/>
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28p55x_pmbus_over_i2c_target_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p55x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p55x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p55x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P550SJ9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p55x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P55x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,36 @@
<projectSpec>
<project
name="f28p55x_pmbus_target_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28P55x --package 128PDT --part F28P55x_128PDT"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p55x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p55x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p55x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p55x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_ram_lnk.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p55x_generic_flash_lnk.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P550SJ9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p55x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P55x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28p55x/pmbus_target.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,35 @@
<projectSpec>
<project
name="f28p65x_pmbus_controller_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28P65x --package 256ZEJ --part F28P65x_256ZEJ"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p65x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p65x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p65x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_ram_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_flash_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P650DK9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p65x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P65x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28p65x/pmbus_controller.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28p65x_pmbus_over_i2c_controller_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_controller -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_CONTROLLER --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p65x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p65x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_controller" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p65x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_ram_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_flash_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P650DK9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p65x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P65x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True"/>
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,34 @@
<projectSpec>
<project
name="f28p65x_pmbus_over_i2c_target_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
>
<configuration name="RAM" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --define=PMBUS_OVER_I2C --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/pmbus_over_i2c_target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=PMBUS_OVER_I2C --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p65x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p65x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/pmbus_over_i2c_target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p65x/pmbus_over_i2c_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_ram_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_flash_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P650DK9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p65x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P65x_PMBus_Communications_Stack_Over_I2C.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/../../../dsp/VCU/c28/lib/c28x_vcrc_library_fpu32.lib" targetDirectory="" excludeFromBuild="True" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
</project>
</projectSpec>
@@ -0,0 +1,36 @@
<projectSpec>
<project
name="f28p65x_pmbus_target_example"
device="Generic C28xx Device"
cgtVersion="22.6.0.LTS"
products="C2000WARE"
outputFormat="ELF"
launchWizard="False"
linkerCommandFile=""
enableSysConfigTool="true"
sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F28P65x --package 256ZEJ --part F28P65x_256ZEJ"
>
<configuration name="RAM" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=_RAM --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<configuration name="FLASH" compilerBuildOptions="-O2 -I${PMBUS_ROOT}/include -I${C2000WARE_DLIB_ROOT} -I${C2000WARE_DEVICE_SUPPORT_ROOT}/common/include -I${PMBUS_EXAMPLE_COMMON_ROOT}/f28p65x -I${PMBUS_EXAMPLE_COMMON_ROOT}/target -I${PMBUS_EXAMPLE_COMMON_ROOT}/include -v28 -ml -mt --float_support=fpu32 --define=CPU1 --define=_DEBUG --define=_PMBUS_TARGET --define=_FLASH --diag_warning=225 --display_error_number --diag_suppress=10063" linkerBuildOptions="--stack_size=0x300 --heap_size=0x200 --rom_model --entry_point=code_start" />
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../device_support/f28p65x/" scope="project" />
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../driverlib/f28p65x/driverlib/" scope="project" />
<pathVariable name="PMBUS_ROOT" path="../../" scope="project" />
<pathVariable name="PMBUS_EXAMPLE_COMMON_ROOT" path="../common" scope="project" />
<pathVariable name="C2000WARE_ROOT" path="../../../../../../" scope="project" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/target" targetDirectory="" />
<file action="copy" path="PMBUS_EXAMPLE_COMMON_ROOT/f28p65x/pmbus_examples_setup.c" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_ram_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/cmd/28p65x_generic_flash_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/targetConfigs/TMS320F28P650DK9.ccxml" targetDirectory="" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/driverlib.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/include/device.h" targetDirectory="device" />
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/common/source/f28p65x_codestartbranch.asm" targetDirectory="" />
<file action="link" path="PMBUS_ROOT/lib/F28P65x_PMBus_Communications_Stack.lib" targetDirectory="" />
<file action="link" path="C2000WARE_DLIB_ROOT/ccs/Debug/driverlib.lib" targetDirectory="" />
<file action="copy" path="C2000WARE_DLIB_ROOT" targetDirectory="device" excludeFromBuild="True" />
<file action="copy" path="../common/f28p65x/pmbus_target.syscfg" targetDirectory="" />
</project>
</projectSpec>
@@ -0,0 +1,257 @@
//###########################################################################
//
// FILE: main.c
//
// TITLE: PMBUS Controller Demo Code
//
// Note: Requires connection to PMBus target running target demo
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
#include "board.h"
//
// Defines
//
#define ZERO_BYTES 0U
#define FOUR_BYTES 4U
#define PMBSTS_EOM_S 5U
#define PMBSTS_NACK_S 6U
#define PMBSTS_DATAREQUEST_S 4U
#define PMBSTS_PEC_VALID_S 7U
#define PMBSTS_ALERT_EDGE_S 16U
#define PMBSTS_CLK_LOW_TIMEOUT_S 8U
//
// Globals
//
PMBus_StackObject pmbusStackController;
PMBus_StackHandle pmbusStackControllerHandle = &pmbusStackController;
uint16_t pmbusControllerBuffer[256];
volatile bool targetAckReceived = false;
volatile bool controllerDataAvailable = false;
volatile bool controllerDataRequested = false;
volatile bool receivedPecValid = false;
volatile bool endOfMessage = false;
volatile bool alertEdgeAsserted = false;
volatile bool clockLowTimeout = false;
volatile uint16_t bytesReceived = ZERO_BYTES;
volatile uint32_t pmbusStatus = 0UL;
volatile int16_t pass = 0U, fail = 0U;
//
// Function Prototypes
//
#ifdef __cplusplus
#pragma CODE_SECTION(".TI.ramfunc")
#else
#pragma CODE_SECTION(pmbusIntHandler, ".TI.ramfunc")
#endif // __cplusplus
__interrupt void pmbusIntHandler(void);
void PMBusStack_defaultErrorHandler(void);
void (*PMBusStack_errorHandler)(void);
//
// Main
//
int main(void)
{
//
// Locals
//
uint16_t i, counter;
uint32_t moduleFreq = 0U;
PMBusStack_errorHandler = PMBusStack_defaultErrorHandler;
#if defined(_FLASH)
//
// Setup the Flash banks
//
PMBusExample_setupFlash();
#endif // _FLASH
//
// Setup the system clocking
//
PMBusExample_setupSysCtrl();
//
// Enable the PMBUS GPIOs
//
//PMBusExample_setupGPIO();
//
// Setup the interrupt tables, register PMBUS interrupt handler
//
PMBusExample_setupInterrupts(pmbusIntHandler);
//
// Board initialization
//
Board_init();
//
// Setup the PMBUS Library Stack Object
//
PMBusStackObject_setMode(pmbusStackControllerHandle, PMBUS_STACK_MODE_CONTROLLER);
PMBusStack_initModule(pmbusStackControllerHandle, PMBUSA_BASE,
&pmbusControllerBuffer[0]);
//
// Configure the PMBUS module clock to be less than PMBUS_MODULE_FREQ_MAX
//
//moduleFreq = PMBus_configModuleClock(PMBUSA_BASE, PMBUS_MODULE_FREQ_MAX,
// PMBUS_SYS_FREQ_MAX);
//
// Configure the PMBUS bus clock
//
//PMBus_configBusClock(PMBUSA_BASE, PMBUS_CLOCKMODE_STANDARD, moduleFreq);
//
// Call each test sequentially and check the outputs
//
for(i = 0; i < NTESTS; i++)
{
//
// Clear the buffer
// Set the buffer to some default non-zero value
//
memset(pmbusControllerBuffer, 0xBAADU, sizeof(pmbusControllerBuffer));
handle = &PMBUS_TESTS[i];
handle->init = (void (*)(void *))initTestList[i];
handle->run = (void (*)(void *))runTestList[i];
if(handle->init != NULL)
{
handle->init(handle);
}
//
// Reset pass, fail statuses
//
handle->pass = 0;
handle->fail = 0;
//
// Run test when enabled
//
if(handle->enabled == true)
{
//
// Run test
//
handle->run(handle);
//
// Wait some time to allow the target to complete processing the
// transaction before proceeding
//
for(counter = 0U; counter < 1000U; counter++)
{
}
//
// Tally the pass/fail metrics
//
pass += handle->pass;
fail += handle->fail;
//
// Halt debugger if test failed
//
if(handle->fail > 0U)
{
__asm(" ESTOP0");
}
}
//
// Test is disabled
//
else
{
handle->pass = -1;
handle->fail = -1;
}
}
//
// Tests complete - Enter wait loop
//
done();
//
// Code does not reach this point
//
return(1);
}
//
// pmbusIntHandler - This is the main PMBus interrupt handler. Read out the data
// from the PMBus module status register and acknowledge the
// interrupt.
//
__interrupt void pmbusIntHandler(void)
{
//
// Read the PMBus module status register
//
pmbusStatus = PMBus_getStatus(PMBUSA_BASE);
//
// Write to the PMBUS_STACK object
//
PMBusStackObject_setModuleStatus(pmbusStackControllerHandle, pmbusStatus);
//
// Read out individual status information into global variables
//
bytesReceived = (pmbusStatus & PMBUS_PMBSTS_RD_BYTE_COUNT_M) >>
PMBUS_PMBSTS_RD_BYTE_COUNT_S;
endOfMessage = (bool)((pmbusStatus & PMBUS_PMBSTS_EOM) >> PMBSTS_EOM_S);
targetAckReceived = (bool)((~pmbusStatus & PMBUS_PMBSTS_NACK) >>
PMBSTS_NACK_S);
controllerDataRequested = (bool)((pmbusStatus & PMBUS_PMBSTS_DATA_REQUEST) >>
PMBSTS_DATAREQUEST_S);
receivedPecValid = (bool)((pmbusStatus & PMBUS_PMBSTS_PEC_VALID) >>
PMBSTS_PEC_VALID_S);
alertEdgeAsserted = (bool)((pmbusStatus & PMBUS_PMBSTS_ALERT_EDGE) >>
PMBSTS_ALERT_EDGE_S);
clockLowTimeout = (bool)((pmbusStatus & PMBUS_PMBSTS_CLK_LOW_TIMEOUT) >>
PMBSTS_CLK_LOW_TIMEOUT_S);
//
// Check if data is available for controller
// (Bytes of data received isn't zero or is equal to 4 bytes with
// data ready status set)
//
if((bytesReceived != ZERO_BYTES) ||
((bytesReceived == FOUR_BYTES) &&
((pmbusStatus & PMBUS_PMBSTS_DATA_READY) != 0U)))
{
controllerDataAvailable = true;
}
//
// ACK any pending interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
}
void PMBusStack_defaultErrorHandler(void)
{
// User must rewrite this to handle error
for(;;);
}
//
// End of File
//
@@ -0,0 +1,77 @@
//###########################################################################
//
// FILE: pmbus_controller_test.c
//
// TITLE: Various controller transactions for testing target state machine
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//
// Globals
//
PMBus_TestObject PMBUS_TESTS[NTESTS];
PMBus_TestHandle handle;
void (*initTestList[NTESTS])(PMBus_TestHandle) =
{
PMBusController_initSendByteTest,
PMBusController_initWriteByteTest,
PMBusController_initWriteWordTest,
PMBusController_initBlockWriteTest,
PMBusController_initReceiveByteTest,
PMBusController_initReadByteTest,
PMBusController_initReadWordTest,
PMBusController_initBlockReadTest,
PMBusController_initBlockWriteReadProcessCallTest,
PMBusController_initQuickCommandTest,
PMBusController_initBlockWrite2BytesTest,
PMBusController_initBlockWrite3BytesTest,
PMBusController_initBlockRead3BytesTest,
PMBusController_initProcessCallTest,
PMBusController_initAlertTest,
PMBusController_initNoAlertTest,
PMBusController_initGroupCommandTest,
PMBusController_initExtendedWriteByteTest,
PMBusController_initExtendedWriteWordTest,
PMBusController_initExtendedReadByteTest,
PMBusController_initExtendedReadWordTest,
};
void (*runTestList[NTESTS])(PMBus_TestHandle) =
{
PMBusController_runSendByteTest,
PMBusController_runWriteByteTest,
PMBusController_runWriteWordTest,
PMBusController_runBlockWriteTest,
PMBusController_runReceiveByteTest,
PMBusController_runReadByteTest,
PMBusController_runReadWordTest,
PMBusController_runBlockReadTest,
PMBusController_runBlockWriteReadProcessCallTest,
PMBusController_runQuickCommandTest,
PMBusController_runBlockWrite2BytesTest,
PMBusController_runBlockWrite3BytesTest,
PMBusController_runBlockRead3BytesTest,
PMBusController_runProcessCallTest,
PMBusController_runAlertTest,
PMBusController_runNoAlertTest,
PMBusController_runGroupCommandTest,
PMBusController_runExtendedWriteByteTest,
PMBusController_runExtendedWriteWordTest,
PMBusController_runExtendedReadByteTest,
PMBusController_runExtendedReadWordTest,
};
//
// End of File
//
@@ -0,0 +1,732 @@
//###########################################################################
//
// FILE: pmbus_controller_test.h
//
// TITLE: Various controller transactions for testing target state machine
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef PMBUS_CONTROLLER_TEST_H
#define PMBUS_CONTROLLER_TEST_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//*****************************************************************************
//
//!
//! \defgroup PMBUS_CONTROLLER_TESTS PMBus Controller Mode Tests
//
//!
//! \ingroup PMBUS_CONTROLLER_TESTS
// @{
//
//*****************************************************************************
//
// Includes
//
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "pmbus_examples_setup.h"
#include "pmbus_stack_handler.h"
//
// Defines
//
#define ENABLE_TEST_1 1 // Send Byte
#define ENABLE_TEST_2 1 // Write Byte
#define ENABLE_TEST_3 1 // Write Word
#define ENABLE_TEST_4 1 // Block Write
#define ENABLE_TEST_5 1 // Receive Byte
#define ENABLE_TEST_6 1 // Read Byte
#define ENABLE_TEST_7 1 // Read Word
#define ENABLE_TEST_8 1 // Block Read
#define ENABLE_TEST_9 1 // Block Write/ Read/ Process Call
#define ENABLE_TEST_10 1 // Quick Command
#define ENABLE_TEST_11 1 // Block Write (command, byte count, 2 bytes)
// - this is actually a write word
#define ENABLE_TEST_12 1 // Block Write (command, byte count, 3 bytes)
#define ENABLE_TEST_13 1 // Block Read (3 bytes)
#define ENABLE_TEST_14 1 // Process call (write word then read word)
#define ENABLE_TEST_15 0 // Alert
#define ENABLE_TEST_16 0 // Alert (from non-existent target)
#define ENABLE_TEST_17 1 // Group Command (target 1st to be addressed)
#define ENABLE_TEST_18 1 // Extended Write Byte
#define ENABLE_TEST_19 1 // Extended Write Word
#define ENABLE_TEST_20 1 // Extended Read Byte
#define ENABLE_TEST_21 1 // Extended Read Word
#define TARGET_ADDRESS_MASK 0xFEU
//
// Typedefs
//
//*****************************************************************************
//
//! PMBUS_TEST structure
//
//*****************************************************************************
typedef struct
{
uint16_t count; //!< #bytes (block transactions > 4)
int16_t pass; //!< pass metric
int16_t fail; //!< fail metric
bool enabled; //!< bool if this test is enabled or not
void (*init)(void *); //!< Function pointer to test init routine
void (*run)(void *); //!< Function pointer to test run routine
} PMBus_TestObject;
//*****************************************************************************
//
//! Handle to the PMBUS_TEST structure
//
//*****************************************************************************
typedef PMBus_TestObject *PMBus_TestHandle;
//
// Globals
//
extern PMBus_TestObject PMBUS_TESTS[NTESTS];
extern PMBus_TestHandle handle;
extern void (*runTestList[NTESTS])(PMBus_TestHandle);
extern void (*initTestList[NTESTS])(PMBus_TestHandle);
extern volatile int16_t pass, fail;
extern PMBus_StackObject pmbusStackController;
extern PMBus_StackHandle pmbusStackControllerHandle;
extern uint16_t pmbusControllerBuffer[256];
extern volatile bool targetAckReceived;
extern volatile bool endOfMessage;
extern volatile bool controllerDataAvailable;
extern volatile bool controllerDataRequested;
extern volatile bool receivedPecValid;
extern volatile bool alertEdgeAsserted;
extern volatile bool clockLowTimeout;
extern volatile uint16_t bytesReceived;
extern volatile uint32_t pmbusStatus;
//
// Function Prototypes
//
//*****************************************************************************
//
//! Reset the global PMBus module flags
//!
//! \return None.
//
//*****************************************************************************
static inline void
PMBusController_resetGlobalFlags(void)
{
targetAckReceived = false;
endOfMessage = false;
controllerDataAvailable = false;
controllerDataRequested = false;
receivedPecValid = false;
alertEdgeAsserted = false;
clockLowTimeout = false;
bytesReceived = 0U;
}
//*****************************************************************************
//
//! Reset the PMBus Stack Object Test Statues and Counts
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
static inline void
PMBusController_resetTestObject(PMBus_TestHandle handle)
{
handle->count = 0U;
handle->pass = 0U;
handle->fail = 0U;
handle->enabled = false;
}
//*****************************************************************************
//
//! Initialize the "Send Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initSendByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Send Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runSendByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Write Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Write Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Write Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Write Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWriteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWriteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Receive Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initReceiveByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Receive Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 2
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runReceiveByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Read Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Read Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 3
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Read Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Read Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Read" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockReadTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Read" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 258
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockReadTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Read (3 Bytes)" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockRead3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Read (3 Bytes)" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 6
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockRead3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write, Block Read, Process Call" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWriteReadProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write, Block Read, Process Call" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 258
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWriteReadProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Quick Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initQuickCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Quick Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runQuickCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write (2 Bytes)" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWrite2BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write (2 Bytes)" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWrite2BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write (3 Bytes)" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWrite3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write (3 Bytes)" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWrite3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Process Call" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Process Call" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Alert" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Alert" Response Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "No Alert" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initNoAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "No Alert" Response Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note This test requires a 2nd PMBus target on the network asserting the
//! alert line.
//! \note Expected pass value: 5
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runNoAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Group Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initGroupCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Group Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runGroupCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Write Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Write Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Write Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Write Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Read Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Read Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 3
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Read Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Read Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
// Close the Doxygen group.
// @}
//
//*****************************************************************************
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif
#endif // PMBUS_CONTROLLER_TEST_H
@@ -0,0 +1,173 @@
//###########################################################################
//
// FILE: test_alert.c
//
// TITLE: Alert Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initAlert
//
//*****************************************************************************
void PMBusController_initAlertTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 1
//
handle->count = 1;
//
// Enable the test
//
#if ENABLE_TEST_15 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_15 == 1
}
//*****************************************************************************
//
// PMBusController_runAlertTest
//
//*****************************************************************************
void PMBusController_runAlertTest(PMBus_TestHandle handle)
{
//
// Increment fail, a DATA_REQUEST should set it back to 0
//
handle->fail++;
//
// Do a Quick command
// Config the controller enable Write (by omitting the read
// option from the configWord, you enable write), 0 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 0U, PMBUS_ENABLE_WRITE);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
if(controllerDataRequested == true)
{
//
// decrement fail if DATA_REQUEST was asserted
//
handle->fail--;
//
// Reset the flag
//
controllerDataRequested = false;
//
// NACK the transaction to complete the quick command
//
PMBus_nackTransaction(PMBUSA_BASE);
}
}
//
// Reset the EOM flag
//
endOfMessage = false;
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Loop till the alert signal is asserted
//
while(alertEdgeAsserted == false)
{
}
//
// Clear the spot where the alerting target's address will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// An alert was received
// Configure the controller to set the address to the alert address,
// enable Read and expect the alerting target's address (no PEC)
//
PMBus_configController(PMBUSA_BASE, ALERT_RESPONSE_ADDRESS, 1U,
PMBUS_CONTROLLER_ENABLE_READ);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0],
pmbusStatus);
//
// NOTE: the alert line needs to be asserted for the target to respond
// to the alert response address, if you de-assert early the target
// ignores the alert response address line. The target state machine will
// de-assert when it detects an EOM, NACK and ALERT_EDGE
//
//
// Check DATA_READY is asserted at the end of alert response
//
(controllerDataAvailable == true) ? handle->pass++ : handle->fail++;
//
// Check that the alerting target sent its address
//
(bytesReceived == 1U) ? handle->pass++ : handle->fail++;
//
// Target sends its address in the 7 most significant bits with a
// 0 or 1 in the LSb, which we dont care about
//
((pmbusControllerBuffer[0] & TARGET_ADDRESS_MASK) == (TARGET_ADDRESS << 1U)) ?
handle->pass++ :
handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 4U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,159 @@
//###########################################################################
//
// FILE: test_block_read.c
//
// TITLE: Block Read (255 bytes) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initBlockReadTest
//
//*****************************************************************************
void PMBusController_initBlockReadTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 255
//
handle->count = 255U;
//
// Enable the test
//
#if ENABLE_TEST_8 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_8 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockReadTest
//
//*****************************************************************************
void PMBusController_runBlockReadTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t count = 0U;
uint16_t nBytes = 0U;
uint16_t i = 0U;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do a read byte
// Config the controller to send a read-block command (by asserting the command
// bit) and then to issue a repeated start followed by a read (i.e. enable
// read) and get handle->count data bytes and a PEC from the target. Also
// enable PEC proecessing on the controller side to verify the PEC
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, handle->count,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_READ |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Load the command byte into the transmit register,
// in this case the PMBUS_CMD_READ_EIN command
//
pmbusControllerBuffer[0] = PMBUS_CMD_READ_EIN;
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 1U);
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
if(controllerDataAvailable == true)
{
//
// Reset the flag
//
controllerDataAvailable = false;
count = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[nBytes],
pmbusStatus);
nBytes += count;
}
}
if((endOfMessage == true) && (controllerDataAvailable == true))
{
//
// EOM = 1 DATA_READY = 1, but this wasnt captured in the while loop
// above
//
count = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[nBytes],
pmbusStatus);
nBytes += count;
//
// No need to reset these flags, they will be reset at the start of the
// next test
//
}
//
// Check that we got nBytes + 1 (byte count) bytes
//
(nBytes == handle->count + 1) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == handle->count) ? handle->pass++ : handle->fail++;
for(i = 1U; i <= handle->count; i++)
{
if(pmbusControllerBuffer[i] == (PMBUS_CMD_READ_EIN ^ i))
{
handle->pass++;
}
else
{
handle->fail++;
}
}
(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 258U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,159 @@
//###########################################################################
//
// FILE: test_block_read_3_bytes.c
//
// TITLE: Block Read (3 bytes) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initBlockRead3BytesTest
//
//*****************************************************************************
void PMBusController_initBlockRead3BytesTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 3
//
handle->count = 3U;
//
// Enable the test
//
#if ENABLE_TEST_13 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_13 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockRead3BytesTest
//
//*****************************************************************************
void PMBusController_runBlockRead3BytesTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t count = 0U;
uint16_t nBytes = 0U;
uint16_t i = 0U;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do a read byte
// Config the controller to send a read-block command (by asserting the command
// bit) and then to issue a repeated start followed by a read (i.e. enable
// read) and get handle->count data bytes and a PEC from the target. Also
// enable PEC proecessing on the controller side to verify the PEC
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, handle->count,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_READ |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Load the command byte into the transmit register,
// in this case the PMBUS_CMD_READ_EOUT command
//
pmbusControllerBuffer[0] = PMBUS_CMD_READ_EOUT;
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 1U);
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
if(controllerDataAvailable == true)
{
//
// Reset the flag
//
controllerDataAvailable = false;
count = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[nBytes],
pmbusStatus);
nBytes += count;
}
}
if((endOfMessage == true) && (controllerDataAvailable == true))
{
//
// EOM = 1 DATA_READY = 1, but this wasnt captured in the while loop
// above
//
count = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[nBytes],
pmbusStatus);
nBytes += count;
//
// No need to reset these flags, they will be reset at the start of the
// next test
//
}
//
// Check that we got nBytes + 1 (byte count) bytes
//
(nBytes == handle->count + 1) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == handle->count) ? handle->pass++ : handle->fail++;
for(i = 1U; i <= handle->count; i++)
{
if(pmbusControllerBuffer[i] == (PMBUS_CMD_READ_EOUT ^ i))
{
handle->pass++;
}
else
{
handle->fail++;
}
}
(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 6U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,161 @@
//###########################################################################
//
// FILE: test_block_write.c
//
// TITLE: Block Write (255 bytes) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initBlockWriteTest
//
//*****************************************************************************
void PMBusController_initBlockWriteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set the block length to 255
//
handle->count = 255U;
//
// Enable the test
//
#if ENABLE_TEST_4 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_4 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockWriteTest
//
//*****************************************************************************
void PMBusController_runBlockWriteTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t i = 0U;
//
// Set command in buffer
//
pmbusControllerBuffer[0] = PMBUS_CMD_VIN_OV_FAULT_LIMIT;
for(i = 1U; i <= handle->count; i++)
{
//
// Bytes #0 to #N-1 (254)
//
pmbusControllerBuffer[i] = i - 1;
}
//
// Block writes must be done in chunks of 4 bytes starting with the
// command byte
//
//
// Config the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// >=3 bytes to transfer
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, handle->count,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_CMD));
//
// Transfer the first 4 bytes, i.e., command, byte #0, #1, #2
// NOTE: Byte count is automatically inserted after command
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 4U);
//
// Write the remaining bytes in chunks of 4, last transaction is N+2 % 4
//
for(i = 4U; i <= handle->count;)
{
//
// Wait for DATA_REQUEST to assert
//
while(controllerDataRequested == false)
{
}
controllerDataRequested = false;
if((handle->count - i - 1U) >= 4U)
{
//
// Transfer 4 bytes at a time
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[i], 4U);
i = i + 4U;
}
else
{
//
// Remaing bytes < 4U
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[i],
(handle->count + 1U - i));
i += (handle->count + 1U - i);
}
//
// NOTE: PEC is automatically inserted at the end of block write
// transmission
//
}
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,128 @@
//###########################################################################
//
// FILE: test_block_write_2_bytes.c
//
// TITLE: Block Write (2 bytes) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initBlockWrite2BytesTest
//
//*****************************************************************************
void PMBusController_initBlockWrite2BytesTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set the block length to 2
//
handle->count = 2U;
//
// Enable the test
//
#if ENABLE_TEST_11 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_11 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockWrite2BytesTest
//
//*****************************************************************************
void PMBusController_runBlockWrite2BytesTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t i = 0U;
//
// Set command in buffer
//
pmbusControllerBuffer[0] = PMBUS_CMD_PAGE_PLUS_WRITE;
for(i = 1U; i <= handle->count; i++)
{
//
// Bytes #0 to #N-1 (1)
//
pmbusControllerBuffer[i] = pmbusControllerBuffer[0] ^ i;
}
//
// Block writes must be done in chunks of 4 bytes starting with the
// command byte
//
//
// Config the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// >3 bytes to transfer
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, handle->count,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_CMD));
//
// Transfer the first 3 bytes, i.e., command, byte #0, #1,
// NOTE: Byte count is NOT automatically inserted after command
// sinces less than 3 bytes are being transferred. This
// is an anomalous condition
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 3U);
//
// NOTE: PEC is automatically inserted at the end of block write
// transmission
//
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,126 @@
//###########################################################################
//
// FILE: test_block_write_3_bytes.c
//
// TITLE: Block Write (3 bytes)
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initBlockWrite3BytesTest
//
//*****************************************************************************
void PMBusController_initBlockWrite3BytesTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set the block length to 3
//
handle->count = 3U;
//
// Enable the test
//
#if ENABLE_TEST_12 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_12 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockWrite3BytesTest
//
//*****************************************************************************
void PMBusController_runBlockWrite3BytesTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t i = 0U;
//
// Put command in buffer
//
pmbusControllerBuffer[0] = PMBUS_CMD_PAGE_PLUS_WRITE;
for(i = 1U; i <= handle->count; i++)
{
//
// Bytes #0 to #N-1 (2)
//
pmbusControllerBuffer[i] = pmbusControllerBuffer[0] ^ i;
}
//
// Block writes must be done in chunks of 4 bytes starting with the
// command byte
//
//
// Config the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// >3 bytes to transfer
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, handle->count,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_CMD));
//
// Transfer the first 3 bytes, i.e., command, byte #0, #1, #2
// NOTE: Byte count is automatically inserted after command
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 4U);
//
// NOTE: PEC is automatically inserted at the end of block write
// transmission
//
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,220 @@
//###########################################################################
//
// FILE: test_block_wrpc.c
//
// TITLE: Block Write-Read Process Call (255 bytes) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initBlockWriteReadProcessCallTest
//
//*****************************************************************************
void PMBusController_initBlockWriteReadProcessCallTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 255
//
handle->count = 255U;
//
// Enable the test
//
#if ENABLE_TEST_9 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_9 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockWriteReadProcessCallTest
//
//*****************************************************************************
void PMBusController_runBlockWriteReadProcessCallTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t i;
uint16_t count = 0U;
uint16_t nBytes = 0U;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// command, soon to be overwritten by block read
//
pmbusControllerBuffer[0] = PMBUS_CMD_PAGE_PLUS_READ;
for(i = 1U; i <= handle->count; i++)
{
//
// Bytes #0 to #N-1
//
pmbusControllerBuffer[i] = pmbusControllerBuffer[0] ^ i;
}
//
// Block-Write, Block-Read, and Process Call
// Config the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// enable process call (the controller does the block read, with the repeated
// start, right after the block write finishes)
// Write, and then read, handle->count bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, handle->count,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_PRC_CALL |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Transfer the first 4 bytes, i.e., command, byte #0, #1, #2
// NOTE: Byte count is automatically inserted after command
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 4U);
//
// Write the remaining bytes in chunks of 4, last transaction is N+2 % 4
//
for(i = 4U; i <= handle->count;)
{
//
// Wait for DATA_REQUEST to assert
//
while(controllerDataRequested == false)
{
}
controllerDataRequested = false;
if((handle->count - i - 1U) >= 4U)
{
//
// Transfer 4 bytes at a time
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[i], 4U);
i = i + 4U;
}
else
{
//
// remaining bytes < 4U
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[i],
(handle->count + 1U - i));
i += (handle->count + 1U - i);
}
//
// NOTE: PEC is not transmitted for a Block Write-Read Process Call
//
}
//
// Controller automatically issues a repeated start (because of the process
// call), and waits for the target to respond with the block data...when
// the necessary bytes (specified in PMBMC.BYTE_COUNT) is received, controller
// NACKs last byte and generates an EOM
// However, if the target is transmitting more than 3 bytes, the
// DATA_READY goes high first, the RXBUF is full and must be read
// before the target can send any more data
//
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
if(controllerDataAvailable == true)
{
//
// Reset the flag
//
controllerDataAvailable = false;
count = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[nBytes],
pmbusStatus);
nBytes += count;
}
}
if((endOfMessage == true) && (controllerDataAvailable == true))
{
//
// EOM = 1 DATA_READY = 1, but this wasnt captured in the while loop
// above
//
count = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[nBytes],
pmbusStatus);
nBytes += count;
//
// No need to reset these flags, they will be reset at the start of the
// next test
//
}
//
// Check that we got nBytes + 1 (byte count) bytes
//
(nBytes == handle->count + 1) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == handle->count) ? handle->pass++ : handle->fail++;
for(i = 1U; i <= handle->count; i++)
{
if(pmbusControllerBuffer[i] == PMBUS_CMD_PAGE_PLUS_READ)
{
handle->pass++;
}
else
{
handle->fail++;
}
}
(receivedPecValid == true) ? handle->pass++: handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 258U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,126 @@
//###########################################################################
//
// FILE: test_extended_read_byte.c
//
// TITLE: Read Byte (Extended)
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initExtendedReadByteTest
//
//*****************************************************************************
void PMBusController_initExtendedReadByteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 1
//
handle->count = 1;
//
// Enable the test
//
#if ENABLE_TEST_20 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_20 == 1
}
//*****************************************************************************
//
// PMBusController_runExtendedReadByteTest
//
//*****************************************************************************
void PMBusController_runExtendedReadByteTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t nBytes = 0U;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do an extended read byte
// Config the controller to send an extended read-byte command
// (by asserting the command and extended command bits) and then to issue
// a repeated start followed by a read (i.e. enable
// read) and get a data byte and a PEC from the target. Also enable PEC
// processing on the controller side to verify the PEC
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, handle->count,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_READ |
PMBUS_CONTROLLER_ENABLE_CMD | PMBUS_CONTROLLER_ENABLE_EXT_CMD));
//
// Load the extended command and command bytes into the transmit register,
// in this case the PMBUS_CMD_OPERATION command
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_SPECIFIC_COMMAND;
pmbusControllerBuffer[1] = PMBUS_CMD_OPERATION;
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], TEST20_2BYTES);
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
}
nBytes = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0],
pmbusStatus);
//
// Check the received byte
//
(nBytes == handle->count) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == (PMBUS_CMD_OPERATION ^ CMD_XOR_MASK_V1)) ?
handle->pass++ : handle->fail++;
(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 3U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,129 @@
//###########################################################################
//
// FILE: test_extended_read_word.c
//
// TITLE: Read Word (Extended) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initExtendedReadWordTest
//
//*****************************************************************************
void PMBusController_initExtendedReadWordTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 2
//
handle->count = 2;
//
// Enable the test
//
#if ENABLE_TEST_21 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_21 == 1
}
//*****************************************************************************
//
// PMBusController_runExtendedReadWordTest
//
//*****************************************************************************
void PMBusController_runExtendedReadWordTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t nBytes = 0U;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do a extended read byte
// Configure the controller to send a read-word command (by asserting the
// command and extended command bits) and then to issue a repeated start
// followed by a read (i.e. enable read) and get two data bytes and a
// PEC from the target. Also enable PEC processing on the controller side to
// verify the PEC
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, TEST21_2BYTES,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_READ |
PMBUS_CONTROLLER_ENABLE_CMD | PMBUS_CONTROLLER_ENABLE_EXT_CMD));
//
// Load the extended command and command bytes into the transmit register,
// in this case the PMBUS_CMD_VOUT_COMMAND command
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_SPECIFIC_COMMAND;
pmbusControllerBuffer[1] = PMBUS_CMD_VOUT_COMMAND;
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], handle->count);
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
}
nBytes = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0],
pmbusStatus);
//
// Check the received byte
//
(nBytes == handle->count) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == (PMBUS_CMD_VOUT_COMMAND ^ CMD_XOR_MASK_V1)) ?
handle->pass++ : handle->fail++;
(pmbusControllerBuffer[1] == (PMBUS_CMD_VOUT_COMMAND ^ CMD_XOR_MASK_V2)) ?
handle->pass++ : handle->fail++;
(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 4U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,98 @@
//###########################################################################
//
// FILE: test_extended_write_byte.c
//
// TITLE: Write Byte (Extended)
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initExtendedWriteByteTest
//
//*****************************************************************************
void PMBusController_initExtendedWriteByteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Enable the test
//
#if ENABLE_TEST_18 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_18 == 1
}
//*****************************************************************************
//
// PMBusController_runExtendedWriteByteTest
//
//*****************************************************************************
void PMBusController_runExtendedWriteByteTest(PMBus_TestHandle handle)
{
//
// Add extended command (index 0), command (index 1), and
// byte data to buffer (index 2)
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_SPECIFIC_COMMAND;
pmbusControllerBuffer[1] = PMBUS_CMD_STORE_DEFAULT_CODE;
pmbusControllerBuffer[2] = PMBUS_CMD_STORE_DEFAULT_CODE ^ CMD_XOR_MASK_V1;
//
// Do an extended write byte
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable extended command,
// 1 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 1U,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_EXT_CMD |
PMBUS_CONTROLLER_ENABLE_CMD));
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 3U);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,103 @@
//###########################################################################
//
// FILE: test_extended_write_word.c
//
// TITLE: Write Word (Extended) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initExtendedWriteWordTest
//
//*****************************************************************************
void PMBusController_initExtendedWriteWordTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Enable the test
//
#if ENABLE_TEST_19 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_19 == 1
}
//*****************************************************************************
//
// PMBusController_runExtendedWriteWordTest
//
//*****************************************************************************
void PMBusController_runExtendedWriteWordTest(PMBus_TestHandle handle)
{
//
// Add extended command (index 0), command (index 1), and
// word data to buffer (index 2 and 3)
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_SPECIFIC_COMMAND;
pmbusControllerBuffer[1] = PMBUS_CMD_VOUT_COMMAND;
pmbusControllerBuffer[2] = PMBUS_CMD_VOUT_COMMAND ^ CMD_XOR_MASK_V1;
pmbusControllerBuffer[3] = PMBUS_CMD_VOUT_COMMAND ^ CMD_XOR_MASK_V2;
//
// Do an extended write word
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable extended command,
// 2 bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, TEST19_2BYTES,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_EXT_CMD |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send extended command, command, and 1 word of data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], TEST19_4BYTES);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,265 @@
//###########################################################################
//
// FILE: test_group_command.c
//
// TEST: Group Command Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initGroupCommandTest
//
//*****************************************************************************
void PMBusController_initGroupCommandTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 3
//
handle->count = 3U;
//
// Enable the test
//
#if ENABLE_TEST_17 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_17 == 1
}
//*****************************************************************************
//
// PMBusController_runGroupCommandTest
//
//*****************************************************************************
void PMBusController_runGroupCommandTest(PMBus_TestHandle handle)
{
//
// Clear the spot where the alerting target's address will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Add command (index 0) and
// word data to buffer (index 1 and 2)
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_VOUT_MIN;
pmbusControllerBuffer[1] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V3;
pmbusControllerBuffer[2] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V4;
//
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable group command,
// enable command, 2 bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, TEST17_2BYTES,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_GRP_CMD |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], handle->count);
//
// Wait on DATA_REQUEST
//
while(controllerDataRequested == false)
{
//
// Fail if EOM & NACK after the 1st message
//
if(endOfMessage == true && targetAckReceived == false)
{
handle->fail++;
break;
}
}
//
// Reset data requested flag
//
controllerDataRequested = false;
//
// Check if target ACK is received
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Clear the spot where the alerting target's address will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Add command (index 0) and
// word data to buffer (index 1 and 2)
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_VOUT_MAX;
pmbusControllerBuffer[1] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V3;
pmbusControllerBuffer[2] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V4;
//
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable group command,
// enable command, 2 bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS + 1U, TEST17_2BYTES,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_GRP_CMD |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], handle->count);
//
// Wait on DATA_REQUEST
//
while(controllerDataRequested == false)
{
//
// exit if EOM & NACK after the 2nd message
// This target doesnt exist on the bus and controller will see
// a NACK for this address, which generateds the EOM.
//
if((endOfMessage == true) && (targetAckReceived == false))
{
handle->pass++;
break;
}
}
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Clear the spot where the alerting target's address will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Add command (index 0) and
// word data to buffer (index 1 and 2)
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_IOUT_MAX;
pmbusControllerBuffer[1] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V3;
pmbusControllerBuffer[2] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V4;
//
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable group command,
// enable command, 2 bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS + 2U, TEST17_2BYTES,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_GRP_CMD |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], handle->count);
//
// Wait on DATA_REQUEST
//
while(controllerDataRequested == false)
{
//
// exit if EOM & NACK after the 3rd message
// This target doesnt exist on the bus and controller will see
// a NACK for this address, which generateds the EOM.
//
if((endOfMessage == true) && (targetAckReceived == false))
{
handle->pass++;
break;
}
}
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Clear the spot where the alerting target's address will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Add command (index 0) and
// word data to buffer (index 1 and 2)
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_POUT_MAX;
pmbusControllerBuffer[1] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V3;
pmbusControllerBuffer[2] = pmbusControllerBuffer[0] ^ CMD_XOR_MASK_V4;
//
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), disable group command
// (by ommitting it), enable command, 2 bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS + 3U, TEST17_2BYTES,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], handle->count);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// if EOM & NACK after the 4th message
// This target doesnt exist on the bus and controller will see
// a NACK for this address, which generateds the EOM.
//
if((endOfMessage == true) && (targetAckReceived == false))
{
handle->pass++;
}
//
// Check that expected pass counter value is correct
//
if(handle->pass != 4U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,227 @@
//###########################################################################
//
// FILE: test_noalert.c
//
// TITLE: Alert Response to a different target Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initNoAlertTest
//
//*****************************************************************************
void PMBusController_initNoAlertTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 1
//
handle->count = 1U;
//
// Enable the test
//
#if ENABLE_TEST_16 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_16 == 1
}
//*****************************************************************************
//
// PMBusController_runNoAlertTest
//
//*****************************************************************************
void PMBusController_runNoAlertTest(PMBus_TestHandle handle)
{
//
// Important: A 2nd target is required to be on the network to assert
// the alert line in order to test the 1st target software stack response.
//
// Lets assume 2nd target address is 0x39
//
//
// Increment fail, a DATA_REQUEST should set it back to 0
//
handle->fail++;
//
// Do a Quick command
// Config the controller enable Write (by omitting the read
// option from the configWord, you enable write), 0 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_2_ADDRESS, 0U, PMBUS_ENABLE_WRITE);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
if(controllerDataRequested == true)
{
//
// decrement fail if DATA_REQUEST was asserted
//
handle->fail--;
//
// Reset the flag
//
controllerDataRequested = false;
//
// NACK the transaction to complete the quick command
//
PMBus_nackTransaction(PMBUSA_BASE);
}
}
//
// Reset the EOM flag
//
endOfMessage = false;
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Loop till the alert signal is asserted
//
while(alertEdgeAsserted == false)
{
}
//
// Clear the spot where the alerting target's address will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// An alert was recevied
// Configure the controller to set the address to the alert address,
// enable Read and expect the alerting target's address (no PEC)
//
PMBus_configController(PMBUSA_BASE, ALERT_RESPONSE_ADDRESS, 1U,
PMBUS_CONTROLLER_ENABLE_READ);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0],
pmbusStatus);
//
// NOTE: the alert line needs to be asserted for the target to respond
// to the alert response address, if you de-assert early the target
// ignores the alert response address line. The target state machine will
// de-assert when it detects an EOM, NACK and ALERT_EDGE
//
//
// Check DATA_READY is asserted at the end of alert response
//
(controllerDataAvailable == true) ? handle->pass++ : handle->fail++;
//
// Check that the alerting target sent its address
//
(bytesReceived == 1U) ? handle->pass++ : handle->fail++;
//
// Target sends its address in the 7 most significant bits with a
// 0 or 1 in the LSb, which we dont care about
//
((pmbusControllerBuffer[0] & TARGET_ADDRESS_MASK) == (TARGET_2_ADDRESS << 1U)) ?
handle->pass++ :
handle->fail++;
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Increment fail, a DATA_REQUEST should set it back to 0
//
handle->fail++;
//
// Do a Quick command to 1st target
// Config the controller enable Write (by omitting the read
// option from the configWord, you enable write), 0 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 0U, 0U);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
if(controllerDataRequested == true)
{
//
// decrement fail if DATA_REQUEST was asserted
//
handle->fail--;
//
// Reset the flag
//
controllerDataRequested = false;
//
// NACK the transaction to complete the quick command
//
PMBus_nackTransaction(PMBUSA_BASE);
}
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 5U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,139 @@
//###########################################################################
//
// FILE: test_process_call.c
//
// TITLE: Process Call (write word, then read word)
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initProcessCallTest
//
//*****************************************************************************
void PMBusController_initProcessCallTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Enable the test
//
#if ENABLE_TEST_14 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_14 == 1
}
//*****************************************************************************
//
// PMBusController_runProcessCallTest
//
//*****************************************************************************
void PMBusController_runProcessCallTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t nBytes = 0U;
//
// Add command (index 0) and
// word data to buffer (index 1 and 2)
//
pmbusControllerBuffer[0] = PMBUS_CMD_VIN_OV_FAULT_LIMIT;
pmbusControllerBuffer[1] = TEST14_DATA_BYTE_1;
pmbusControllerBuffer[2] = TEST14_DATA_BYTE_2;
//
// Do a Process Call (write word then read word)
// Configure the controller to enable PEC (processing), enable Write (by
// omitting the read option from the configWord, you enable write),
// enable command, enable process call (the controller does the read word,
// with the repeated start, right after the write word finishes)
// Write, and then read 2 bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 2U,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_PRC_CALL |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 3U);
//
// Controller automatically issues a repeated start (because of the process
// call), and waits for the target to respond with the word...when
// the necessary bytes (specified in PMBMC.BYTE_COUNT) is received, controller
// NACKs last byte and generates an EOM
//
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
}
if((endOfMessage == true) && (controllerDataAvailable == true))
{
//
// EOM = 1 DATA_READY = 1
//
nBytes = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[nBytes],
pmbusStatus);
//
// No need to reset these flags, they will be reset at the start of the
// next test
//
}
//
// Check that we got 2 bytes, correct data, and valid PEC
//
(nBytes == 2U) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == (TEST14_DATA_BYTE_1 ^ TEST14_XOR_MASK)) ?
handle->pass++ : handle->fail++;
(pmbusControllerBuffer[1] == (TEST14_DATA_BYTE_2 ^ TEST14_XOR_MASK)) ?
handle->pass++ : handle->fail++;
(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 4U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,108 @@
//###########################################################################
//
// FILE: test_quick_command.c
//
// TITLE: Quick Command Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initQuickCommandTest
//
//*****************************************************************************
void PMBusController_initQuickCommandTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Enable the test
//
#if ENABLE_TEST_10 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_10 == 1
}
//*****************************************************************************
//
// PMBusController_runQuickCommandTest
//
//*****************************************************************************
void PMBusController_runQuickCommandTest(PMBus_TestHandle handle)
{
//
// Increment fail, a DATA_REQUEST should set it back to 0
//
handle->fail++;
//
// Do a Quick command
// Config the controller enable Write (by omitting the read
// option from the configWord, you enable write), 0 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 0U, PMBUS_ENABLE_WRITE);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
if(controllerDataRequested == true)
{
//
// decrement fail if DATA_REQUEST was asserted
//
handle->fail--;
//
// Reset the data request flag
//
controllerDataRequested = false;
//
// NACK the transaction to complete the quick command
//
PMBus_nackTransaction(PMBUSA_BASE);
}
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,125 @@
//###########################################################################
//
// FILE: test_read_byte.c
//
// TITLE: Read Byte Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initReadByteTest
//
//*****************************************************************************
void PMBusController_initReadByteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 1
//
handle->count = 1;
//
// Enable the test
//
#if ENABLE_TEST_6 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_6 == 1
}
//*****************************************************************************
//
// PMBusController_runReadByteTest
//
//*****************************************************************************
void PMBusController_runReadByteTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t nBytes = 0U;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do a read byte
// Config the controller to send a read-byte command (by asserting the command
// bit) and then to issue a repeated start followed by a read (i.e. enable
// read) and get a data byte and a PEC from the target. Also enable PEC
// proecessing on the controller side to verify the PEC
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 1U,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_READ |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Load the command byte into the transmit register,
// in this case the PMBUS_CMD_OPERATION command
//
pmbusControllerBuffer[0] = PMBUS_CMD_OPERATION;
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 1U);
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
}
//
// Read received data
//
nBytes = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0],
pmbusStatus);
//
// Check the received byte, data, and PEC
//
(nBytes == 1U) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == (PMBUS_CMD_OPERATION ^ CMD_XOR_MASK_V1)) ?
handle->pass++ : handle->fail++;
(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 3U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,127 @@
//###########################################################################
//
// FILE: test_read_word.c
//
// TITLE: Read Word Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initReadWordTest
//
//*****************************************************************************
void PMBusController_initReadWordTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 2
//
handle->count = 2;
//
// Enable the test
//
#if ENABLE_TEST_7 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_7 == 1
}
//*****************************************************************************
//
// PMBusController_runReadWordTest
//
//*****************************************************************************
void PMBusController_runReadWordTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t nBytes = 0U;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do a read byte
// Configure the controller to send a read-word command (by asserting the
// command bit) and then to issue a repeated start followed by a read
// (i.e. enable read) and get two data bytes and a PEC from the target.
// Also enable PEC processing on the controller side to verify the PEC
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 2U,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_READ |
PMBUS_CONTROLLER_ENABLE_CMD));
//
// Load the command byte into the transmit register,
// in this case the PMBUS_CMD_VOUT_COMMAND command
//
pmbusControllerBuffer[0] = PMBUS_CMD_VOUT_COMMAND;
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 1U);
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
while(endOfMessage == false)
{
}
//
// Get received data
//
nBytes = PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0],
pmbusStatus);
//
// Check the received byte, data, and PEC
//
(nBytes == 2U) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == (PMBUS_CMD_VOUT_COMMAND ^ CMD_XOR_MASK_V1)) ?
handle->pass++ : handle->fail++;
(pmbusControllerBuffer[1] == (PMBUS_CMD_VOUT_COMMAND ^ CMD_XOR_MASK_V2)) ?
handle->pass++ : handle->fail++;
(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 4U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,103 @@
//###########################################################################
//
// FILE: test_receive_byte.c
//
// TITLE: Receive Byte Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initReceiveByteTest
//
//*****************************************************************************
void PMBusController_initReceiveByteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 1
//
handle->count = 1;
//
// Enable the test
//
#if ENABLE_TEST_5 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_5 == 1
}
//*****************************************************************************
//
// PMBusController_runReceiveByteTest
//
//*****************************************************************************
void PMBusController_runReceiveByteTest(PMBus_TestHandle handle)
{
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do a receive byte
// Configure the controller to enable PEC, enable Read
// Expect 1 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 1U,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_READ));
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Get received data
//
PMBus_getControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], pmbusStatus);
//
// Check the received byte and data
//
(bytesReceived == 1U) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == TEST5_DATA_BYTE) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 2U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,96 @@
//###########################################################################
//
// FILE: test_send_byte.c
//
// TITLE: Send Byte Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initSendByteTest
//
//*****************************************************************************
void PMBusController_initSendByteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Enable the test
//
#if ENABLE_TEST_1 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_1 == 1
}
//*****************************************************************************
//
// PMBusController_runSendByteTest
//
//*****************************************************************************
void PMBusController_runSendByteTest(PMBus_TestHandle handle)
{
//
// Place data in buffer
//
pmbusControllerBuffer[0] = TEST1_DATA_BYTE;
//
// Do a send byte
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), 1 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 1U, PMBUS_CONTROLLER_ENABLE_PEC);
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 1U);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,99 @@
//###########################################################################
//
// FILE: test_write_byte.c
//
// TITLE: Write Byte Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initWriteByteTest
//
//*****************************************************************************
void PMBusController_initWriteByteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Enable the test
//
#if ENABLE_TEST_2 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_2 == 1
}
//*****************************************************************************
//
// PMBusController_runWriteByteTest
//
//*****************************************************************************
void PMBusController_runWriteByteTest(PMBus_TestHandle handle)
{
//
// Put command (index 0) into buffer and 1 byte of data (index 1)
//
pmbusControllerBuffer[0] = PMBUS_CMD_VIN_OV_FAULT_LIMIT;
pmbusControllerBuffer[1] = TEST2_DATA_BYTE;
//
// Do a write byte
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// 1 byte
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 1U,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 2U);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,101 @@
//###########################################################################
//
// FILE: test_write_word.c
//
// TITLE: Write Word Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_controller_test.h"
//*****************************************************************************
//
// PMBusController_initWriteWordTest
//
//*****************************************************************************
void PMBusController_initWriteWordTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Enable the test
//
#if ENABLE_TEST_3 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_3 == 1
}
//*****************************************************************************
//
// PMBusController_runWriteWordTest
//
//*****************************************************************************
void PMBusController_runWriteWordTest(PMBus_TestHandle handle)
{
//
// Add command (index 0) and
// word data to buffer (index 1 and 2)
//
pmbusControllerBuffer[0] = PMBUS_CMD_VIN_OV_FAULT_LIMIT;
pmbusControllerBuffer[1] = TEST3_DATA_BYTE_1;
pmbusControllerBuffer[2] = TEST3_DATA_BYTE_2;
//
// Do a write word
// Configure the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// 2 bytes
//
PMBus_configController(PMBUSA_BASE, TARGET_ADDRESS, 2U,
(PMBUS_CONTROLLER_ENABLE_PEC | PMBUS_CONTROLLER_ENABLE_CMD));
//
// Send data
//
PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 3U);
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,35 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F280015x" --package "100PZ" --part "F280015x_100PZ" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_ALERT","PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
pmbus1.PMBusInt.enableInterrupt = true;
/**
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
* re-solve from scratch.
*/
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.35";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.36";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.78";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.79";
@@ -0,0 +1,40 @@
//###########################################################################
//
// FILE: pmbus_examples_defines.h
//
// TITLE: f280015x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef F280015X_EXAMPLES_DEFINES_H
#define F280015X_EXAMPLES_DEFINES_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Interrupt Acknowledgement
//
#define PMBUS_INT_ACK INTERRUPT_ACK_GROUP7
#define I2C_INT_ACK INTERRUPT_ACK_GROUP8
#define TIMER_INT_ACK INTERRUPT_ACK_GROUP1
#ifdef __cplusplus
}
#endif // extern "C"
#endif // end of F280015X_EXAMPLES_DEFINES_H definition
// End of File
@@ -0,0 +1,145 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f280015x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBusExample_setupGPIO(void)
{
//
// PMBus module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(GPIO_12_PMBUSA_CTL);
GPIO_setPinConfig(GPIO_13_PMBUSA_ALERT);
GPIO_setPinConfig(GPIO_14_PMBUSA_SDA);
GPIO_setPinConfig(GPIO_15_PMBUSA_SCL);
}
//*****************************************************************************
//
// PMBusExample_setupSysCtrl
//
//*****************************************************************************
void PMBusExample_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBusExample_setupInterrupts(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
// Interrupt_register(INT_PMBUSA, pmbusISR);
//
// Enable the PMBUS interrupt
//
// Interrupt_enable(INT_PMBUSA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBusExample_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f280015x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupGPIO(void)
{
//
// I2C module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(DEVICE_GPIO_CFG_SDAA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SDAA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SDAA, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCLA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCLA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCLA, GPIO_QUAL_ASYNC);
}
//*****************************************************************************
//
// PMBus_over_I2C_Example_setupSysCtrl
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void), void(*pmbusRxFIFOISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
// Enable FIFO interrupt
Interrupt_register(INT_I2CA_FIFO, pmbusRxFIFOISR);
Interrupt_enable(INT_I2CA_FIFO);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
void PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
//
// ACK any pending group Interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,33 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F280015x" --package "80PN" --part "F280015x_80PN" --product "C2000WARE@4.01.00.00"
* @versions {"tool":"1.12.0+2377"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js");
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.registerInterrupts = true;
pmbus1.BaudRate = 10000000;
pmbus1.mode = "Target";
pmbus1.OwnAddress = 0x6A;
pmbus1.TargetAddress = 0x1A;
pmbus1.configTarget = ["PMBUS_TARGET_AUTO_ACK_4_BYTES","PMBUS_TARGET_ENABLE_PEC_PROCESSING"];
pmbus1.enabledInterrupts = ["PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.35";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.36";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.78";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.79";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,29 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28002x" --package "80QFP" --part "F28002x_80QFP" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_ALERT","PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.35";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.36";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.78";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.79";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,40 @@
//###########################################################################
//
// FILE: pmbus_examples_defines.h
//
// TITLE: f28002x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef F28002X_EXAMPLES_DEFINES_H
#define F28002X_EXAMPLES_DEFINES_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Interrupt Acknowledgement
//
#define PMBUS_INT_ACK INTERRUPT_ACK_GROUP8
#define I2C_INT_ACK INTERRUPT_ACK_GROUP8
#define TIMER_INT_ACK INTERRUPT_ACK_GROUP1
#ifdef __cplusplus
}
#endif // extern "C"
#endif // end of F28002X_EXAMPLES_DEFINES_H definition
// End of File
@@ -0,0 +1,144 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28002x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBusExample_setupGPIO(void)
{
//
// PMBus module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(GPIO_12_PMBUSA_CTL);
GPIO_setPinConfig(GPIO_13_PMBUSA_ALERT);
GPIO_setPinConfig(GPIO_14_PMBUSA_SDA);
GPIO_setPinConfig(GPIO_15_PMBUSA_SCL);
}
//*****************************************************************************
//
// PMBusExample_setupSysCtrl
//
//*****************************************************************************
void PMBusExample_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBusExample_setupInterrupts(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_PMBUSA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_PMBUSA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBusExample_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28003x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2021 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupGPIO(void)
{
//
// I2C module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(DEVICE_GPIO_CFG_SDAA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SDAA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SDAA, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCLA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCLA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCLA, GPIO_QUAL_ASYNC);
}
//*****************************************************************************
//
// PMBus_over_I2C_Example_setupSysCtrl
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void), void(*pmbusRxFIFOISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
// Enable FIFO interrupt
Interrupt_register(INT_I2CA_FIFO, pmbusRxFIFOISR);
Interrupt_enable(INT_I2CA_FIFO);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
void PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,31 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28002x" --package "80QFP" --part "F28002x_80QFP" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.mode = "Target";
pmbus1.OwnAddress = 0x6A;
pmbus1.TargetAddress = 0x1A;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.35";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.36";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.78";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.79";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,35 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28003x" --package "100PZ" --part "F28003x_100PZ" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_ALERT","PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
pmbus1.PMBusInt.enableInterrupt = true;
/**
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
* re-solve from scratch.
*/
pmbus1.pmbus.pmbus_alertPin.$suggestSolution = "ball.50";
pmbus1.pmbus.pmbus_ctlPin.$suggestSolution = "ball.51";
pmbus1.pmbus.pmbus_sclPin.$suggestSolution = "ball.95";
pmbus1.pmbus.pmbus_sdaPin.$suggestSolution = "ball.96";
@@ -0,0 +1,40 @@
//###########################################################################
//
// FILE: pmbus_examples_defines.h
//
// TITLE: f28003x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef F28003X_EXAMPLES_DEFINES_H
#define F28003X_EXAMPLES_DEFINES_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Interrupt Acknowledgement
//
#define PMBUS_INT_ACK INTERRUPT_ACK_GROUP8
#define I2C_INT_ACK INTERRUPT_ACK_GROUP8
#define TIMER_INT_ACK INTERRUPT_ACK_GROUP1
#ifdef __cplusplus
}
#endif // extern "C"
#endif // end of F28003X_EXAMPLES_DEFINES_H definition
// End of File
@@ -0,0 +1,144 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28003x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBusExample_setupGPIO(void)
{
//
// PMBus module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(GPIO_12_PMBUSA_CTL);
GPIO_setPinConfig(GPIO_13_PMBUSA_ALERT);
GPIO_setPinConfig(GPIO_14_PMBUSA_SDA);
GPIO_setPinConfig(GPIO_15_PMBUSA_SCL);
}
//*****************************************************************************
//
// PMBusExample_setupSysCtrl
//
//*****************************************************************************
void PMBusExample_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBusExample_setupInterrupts(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_PMBUSA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_PMBUSA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBusExample_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28003x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupGPIO(void)
{
//
// I2C module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(DEVICE_GPIO_CFG_SDAA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SDAA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SDAA, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCLA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCLA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCLA, GPIO_QUAL_ASYNC);
}
//*****************************************************************************
//
// PMBus_over_I2C_Example_setupSysCtrl
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void), void(*pmbusRxFIFOISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
// Enable FIFO interrupt
Interrupt_register(INT_I2CA_FIFO, pmbusRxFIFOISR);
Interrupt_enable(INT_I2CA_FIFO);
//
// ACK any pending group Interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
void PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,33 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28003x" --package "100PZ" --part "F28003x_100PZ" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js");
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.registerInterrupts = true;
pmbus1.BaudRate = 10000000;
pmbus1.mode = "Target";
pmbus1.OwnAddress = 0x6A;
pmbus1.TargetAddress = 0x1A;
pmbus1.configTarget = ["PMBUS_TARGET_AUTO_ACK_4_BYTES","PMBUS_TARGET_ENABLE_PEC_PROCESSING"];
pmbus1.enabledInterrupts = ["PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.50";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.51";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.95";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.96";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,29 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28004x" --package "F28004x_100PZ" --part "F28004x_100PZ" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_ALERT","PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.50";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.51";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.95";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.96";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,40 @@
//###########################################################################
//
// FILE: pmbus_examples_defines.h
//
// TITLE: f28004x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef F28004X_EXAMPLES_DEFINES_H
#define F28004X_EXAMPLES_DEFINES_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Interrupt Acknowledgement
//
#define PMBUS_INT_ACK INTERRUPT_ACK_GROUP8
#define I2C_INT_ACK INTERRUPT_ACK_GROUP8
#define TIMER_INT_ACK INTERRUPT_ACK_GROUP1
#ifdef __cplusplus
}
#endif // extern "C"
#endif // end of F28004X_EXAMPLES_DEFINES_H definition
// End of File
@@ -0,0 +1,144 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28004x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBusExample_setupGPIO(void)
{
//
// PMBus module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(GPIO_12_PMBUSA_CTL);
GPIO_setPinConfig(GPIO_13_PMBUSA_ALERT);
GPIO_setPinConfig(GPIO_2_PMBUSA_SDA);
GPIO_setPinConfig(GPIO_3_PMBUSA_SCL);
}
//*****************************************************************************
//
// PMBusExample_setupSysCtrl
//
//*****************************************************************************
void PMBusExample_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBusExample_setupInterrupts(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_PMBUSA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_PMBUSA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBusExample_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28003x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupGPIO(void)
{
//
// I2C module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(DEVICE_GPIO_CFG_SDAA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SDAA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SDAA, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCLA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCLA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCLA, GPIO_QUAL_ASYNC);
}
//*****************************************************************************
//
// PMBus_over_I2C_Example_setupSysCtrl
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void), void(*pmbusRxFIFOISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
// Enable FIFO interrupt
Interrupt_register(INT_I2CA_FIFO, pmbusRxFIFOISR);
Interrupt_enable(INT_I2CA_FIFO);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
void PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,33 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F28004x" --package "F28004x_100PZ" --part "F28004x_100PZ" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.mode = "Target";
pmbus1.OwnAddress = 0x6A;
pmbus1.TargetAddress = 0x1A;
pmbus1.configTarget = ["PMBUS_TARGET_AUTO_ACK_4_BYTES","PMBUS_TARGET_ENABLE_PEC_PROCESSING"];
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.50";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.51";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.95";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.96";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,29 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F2838x" --package "337bga" --part "F2838x_337bga" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.enablePMBus = true;
pmbus1.registerInterrupts = true;
pmbus1.useInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_ALERT","PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.K1";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.L1";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.K3";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.K2";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,40 @@
//###########################################################################
//
// FILE: pmbus_examples_defines.h
//
// TITLE: f2838x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef F2838X_EXAMPLES_DEFINES_H
#define F2838X_EXAMPLES_DEFINES_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Interrupt Acknowledgement
//
#define PMBUS_INT_ACK INTERRUPT_ACK_GROUP9
#define I2C_INT_ACK INTERRUPT_ACK_GROUP8
#define TIMER_INT_ACK INTERRUPT_ACK_GROUP1
#ifdef __cplusplus
}
#endif // extern "C"
#endif // end of F2838X_EXAMPLES_DEFINES_H definition
// End of File
@@ -0,0 +1,144 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f2838x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBusExample_setupGPIO(void)
{
//
// PMBus module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(GPIO_24_PMBUSA_SCL);
GPIO_setPinConfig(GPIO_25_PMBUSA_SDA);
GPIO_setPinConfig(GPIO_26_PMBUSA_ALERT);
GPIO_setPinConfig(GPIO_27_PMBUSA_CTL);
}
//*****************************************************************************
//
// PMBusExample_setupSysCtrl
//
//*****************************************************************************
void PMBusExample_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 200MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBusExample_setupInterrupts(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_PMBUSA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_PMBUSA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBusExample_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28003x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupGPIO(void)
{
//
// I2C module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(DEVICE_GPIO_CFG_SDAA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SDAA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SDAA, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCLA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCLA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCLA, GPIO_QUAL_ASYNC);
}
//*****************************************************************************
//
// PMBus_over_I2C_Example_setupSysCtrl
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void), void(*pmbusRxFIFOISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
// Enable FIFO interrupt
Interrupt_register(INT_I2CA_FIFO, pmbusRxFIFOISR);
Interrupt_enable(INT_I2CA_FIFO);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
void PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,32 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "F2838x" --package "337bga" --part "F2838x_337bga" --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.mode = "Target";
pmbus1.OwnAddress = 0x6A;
pmbus1.TargetAddress = 0x1A;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "ball.K1";
pmbus1.pmbus.pmbus_ctlPin.$assign = "ball.L1";
pmbus1.pmbus.pmbus_sclPin.$assign = "ball.K3";
pmbus1.pmbus.pmbus_sdaPin.$assign = "ball.K2";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,35 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device F28P55x --package 128PDT --part F28P55x_128PDT --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_ALERT","PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
pmbus1.PMBusInt.enableInterrupt = true;
/**
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
* re-solve from scratch.
*/
pmbus1.pmbus.pmbus_alertPin.$assign = "GPIO27";
pmbus1.pmbus.pmbus_ctlPin.$assign = "GPIO26";
pmbus1.pmbus.pmbus_sclPin.$assign = "GPIO47";
pmbus1.pmbus.pmbus_sdaPin.$assign = "GPIO25";
@@ -0,0 +1,40 @@
//###########################################################################
//
// FILE: pmbus_examples_defines.h
//
// TITLE: f28p55x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef F28P55X_EXAMPLES_DEFINES_H
#define F28P55X_EXAMPLES_DEFINES_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Interrupt Acknowledgement
//
#define PMBUS_INT_ACK INTERRUPT_ACK_GROUP7
#define I2C_INT_ACK INTERRUPT_ACK_GROUP8
#define TIMER_INT_ACK INTERRUPT_ACK_GROUP1
#ifdef __cplusplus
}
#endif // extern "C"
#endif // end of F28P55X_EXAMPLES_DEFINES_H definition
// End of File
@@ -0,0 +1,145 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28p55x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBusExample_setupGPIO(void)
{
//
// PMBus module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(GPIO_26_PMBUSA_CTL);
GPIO_setPinConfig(GPIO_27_PMBUSA_ALERT);
GPIO_setPinConfig(GPIO_25_PMBUSA_SDA);
GPIO_setPinConfig(GPIO_47_PMBUSA_SCL);
}
//*****************************************************************************
//
// PMBusExample_setupSysCtrl
//
//*****************************************************************************
void PMBusExample_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBusExample_setupInterrupts(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_PMBUSA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_PMBUSA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBusExample_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28p55x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupGPIO(void)
{
//
// I2C module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(DEVICE_GPIO_CFG_SDAA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SDAA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SDAA, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCLA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCLA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCLA, GPIO_QUAL_ASYNC);
}
//*****************************************************************************
//
// PMBus_over_I2C_Example_setupSysCtrl
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void), void(*pmbusRxFIFOISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
// Enable FIFO interrupt
Interrupt_register(INT_I2CA_FIFO, pmbusRxFIFOISR);
Interrupt_enable(INT_I2CA_FIFO);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
void PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
//
// ACK any pending group Interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,33 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device F28P55x --package 128PDT --part F28P55x_128PDT --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js");
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.registerInterrupts = true;
pmbus1.BaudRate = 10000000;
pmbus1.mode = "Target";
pmbus1.OwnAddress = 0x6A;
pmbus1.TargetAddress = 0x1A;
pmbus1.configTarget = ["PMBUS_TARGET_AUTO_ACK_4_BYTES","PMBUS_TARGET_ENABLE_PEC_PROCESSING"];
pmbus1.enabledInterrupts = ["PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "GPIO27";
pmbus1.pmbus.pmbus_ctlPin.$assign = "GPIO26";
pmbus1.pmbus.pmbus_sclPin.$assign = "GPIO47";
pmbus1.pmbus.pmbus_sdaPin.$assign = "GPIO25";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,35 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device F28P65x --package 256ZEJ --part F28P65x_256ZEJ --product "C2000WARE@3.01.00.00"
* @versions {"tool":"1.10.0+2163"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js", {}, false);
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.BaudRate = 10000000;
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.registerInterrupts = true;
pmbus1.enabledInterrupts = ["PMBUS_INT_ALERT","PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
pmbus1.PMBusInt.enableInterrupt = true;
/**
* Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
* version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
* re-solve from scratch.
*/
pmbus1.pmbus.pmbus_alertPin.$assign = "GPIO11";
pmbus1.pmbus.pmbus_ctlPin.$assign = "GPIO12";
pmbus1.pmbus.pmbus_sclPin.$assign = "GPIO14";
pmbus1.pmbus.pmbus_sdaPin.$assign = "GPIO13";
@@ -0,0 +1,40 @@
//###########################################################################
//
// FILE: pmbus_examples_defines.h
//
// TITLE: f28p65x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef F280015X_EXAMPLES_DEFINES_H
#define F280015X_EXAMPLES_DEFINES_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Interrupt Acknowledgement
//
#define PMBUS_INT_ACK INTERRUPT_ACK_GROUP9
#define I2C_INT_ACK INTERRUPT_ACK_GROUP8
#define TIMER_INT_ACK INTERRUPT_ACK_GROUP1
#ifdef __cplusplus
}
#endif // extern "C"
#endif // end of F280015X_EXAMPLES_DEFINES_H definition
// End of File
@@ -0,0 +1,145 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28p65x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBusExample_setupGPIO(void)
{
//
// PMBus module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(GPIO_12_PMBUSA_CTL);
GPIO_setPinConfig(GPIO_11_PMBUSA_ALERT);
GPIO_setPinConfig(GPIO_13_PMBUSA_SDA);
GPIO_setPinConfig(GPIO_14_PMBUSA_SCL);
}
//*****************************************************************************
//
// PMBusExample_setupSysCtrl
//
//*****************************************************************************
void PMBusExample_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBusExample_setupInterrupts(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
// Interrupt_register(INT_PMBUSA, pmbusISR);
//
// Enable the PMBUS interrupt
//
// Interrupt_enable(INT_PMBUSA);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(PMBUS_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBusExample_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.c
//
// TITLE: f28p65x Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_examples_setup.h"
//*****************************************************************************
//
// PMBusExample_setupGPIO
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupGPIO(void)
{
//
// I2C module is accessible over other GPIO pin mux configurations
// as well. Refer to the device TRM for the different pin configurations
//
GPIO_setPinConfig(DEVICE_GPIO_CFG_SDAA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SDAA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SDAA, GPIO_QUAL_ASYNC);
GPIO_setPinConfig(DEVICE_GPIO_CFG_SCLA);
GPIO_setPadConfig(DEVICE_GPIO_PIN_SCLA, GPIO_PIN_TYPE_PULLUP);
GPIO_setQualificationMode(DEVICE_GPIO_PIN_SCLA, GPIO_QUAL_ASYNC);
}
//*****************************************************************************
//
// PMBus_over_I2C_Example_setupSysCtrl
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupSysCtrl(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
//
// Setup PLL and clock dividers for 100MHz
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Enable the PMBUS-A peripheral at the system level
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
}
//*****************************************************************************
//
// PMBusExample_setupInterrupts
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void), void(*pmbusRxFIFOISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
// Enable FIFO interrupt
Interrupt_register(INT_I2CA_FIFO, pmbusRxFIFOISR);
Interrupt_enable(INT_I2CA_FIFO);
//
// ACK any pending group interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
void PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void))
{
//
// Initialize PIE and clear PIE registers. Disables CPU interrupts
//
Interrupt_initModule();
//
// Initialize the interrupt vector table
//
Interrupt_initVectorTable();
//
// Register user defined PMBUS ISR
//
Interrupt_register(INT_I2CA, pmbusISR);
//
// Enable the PMBUS interrupt
//
Interrupt_enable(INT_I2CA);
//
// ACK any pending group Interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
//
// Globally enable all interrupts
//
Interrupt_enableGlobal();
}
//*****************************************************************************
//
// PMBusExample_setupFlash
//
//*****************************************************************************
void PMBus_over_I2C_Example_setupFlash(void)
{
#if defined(_FLASH)
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif //defined(_FLASH)
}
//*****************************************************************************
//
// done
//
//*****************************************************************************
void done(void)
{
for(;;);
}
//*****************************************************************************
//
// __error__
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
__asm(" ESTOP0");
}
//
// End of File
//
@@ -0,0 +1,33 @@
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device F28P65x --package 256ZEJ --part F28P65x_256ZEJ --product "C2000WARE@4.01.00.00"
* @versions {"tool":"1.12.0+2377"}
*/
/**
* Import the modules used in this configuration.
*/
const pmbus = scripting.addModule("/driverlib/pmbus.js");
const pmbus1 = pmbus.addInstance();
/**
* Write custom configuration values to the imported modules.
*/
pmbus1.$name = "myPMBUS0";
pmbus1.registerInterrupts = true;
pmbus1.BaudRate = 10000000;
pmbus1.mode = "Target";
pmbus1.OwnAddress = 0x6A;
pmbus1.TargetAddress = 0x1A;
pmbus1.configTarget = ["PMBUS_TARGET_AUTO_ACK_4_BYTES","PMBUS_TARGET_ENABLE_PEC_PROCESSING"];
pmbus1.enabledInterrupts = ["PMBUS_INT_DATA_READY","PMBUS_INT_DATA_REQUEST","PMBUS_INT_EOM"];
pmbus1.enablePMBus = true;
pmbus1.useInterrupts = true;
pmbus1.pmbus.$assign = "PMBUSA";
pmbus1.pmbus.pmbus_alertPin.$assign = "GPIO11";
pmbus1.pmbus.pmbus_ctlPin.$assign = "GPIO12";
pmbus1.pmbus.pmbus_sclPin.$assign = "GPIO14";
pmbus1.pmbus.pmbus_sdaPin.$assign = "GPIO13";
pmbus1.PMBusInt.enableInterrupt = true;
pmbus1.PMBusInt.interruptHandler = "pmbusIntHandler";
@@ -0,0 +1,353 @@
//###########################################################################
//
// FILE: pmbus_eeprom.h
//
// TITLE: PMBus EEPROM APIs
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef PMBUSEEPROM_H
#define PMBUSEEPROM_H
//
// Includes
//
#include "driverlib.h"
#include "pmbus.h"
#include "device.h"
//
// Defines
//
#define TARGET_ADDRESS 0x50U
#define EEPROM_HIGH_ADDR 0x00U
#define EEPROM_LOW_ADDR 0x00U
#define EEPROM_ADDRESS_BYTES 2U
//
// EEPROM used for this example AT24C256
// (http://www.ti.com/lit/an/slaa208a/slaa208a.pdf)
// Macros specific to AT24C256
//
#define EEPROM_PAGE_SIZE 64U //64 bytes
#define EEPROM_TOTAL_BYTES 32768U //256K bits (or) 32K bytes
#define EEPROM_MAX_NUM_PAGE (EEPROM_TOTAL_BYTES / EEPROM_PAGE_SIZE)
#define EEPROM_MAX_WRITE_CYCLE 5U //5ms
#define WRITE_DELAY_TIME ((((EEPROM_MAX_WRITE_CYCLE * SYSCLK_FREQ)/1000U)-9U)/5U)
#define DELAY_TIME_MICROSECS(x) SysCtl_delay(((x * (uint32_t)100U)-9U)/5U)
//
// To change the PMBus module used. Default to PMBus-A
//
#define BASE (uint32_t)PMBUSA_BASE
#define PMBUS_READ 1U
#define PMBUS_WRITE 0U
//
// Return codes
//
#define BUS_BUSY_ERROR 0x1000U
#define ARBITRATION_LOST_ERROR 0x2000U
#define TARGET_NOT_READY_ERROR 0x3000U
#define SUCCESS 0x0000U
//
// Enumeration for number of bytes
//
typedef enum
{
ONE_BYTE = 1,
TWO_BYTES = 2,
THREE_BYTES = 3,
FOUR_BYTES = 4
} byteCount_t;
//*****************************************************************************
//
// Prototypes for the APIs.
//
//*****************************************************************************
//*****************************************************************************
//
// Configure PMBus to use default timing parameters
//
// param: base is the base address of the PMBus instance used.
//
// return None.
//
//*****************************************************************************
static inline void PMBus_setDefaultTimingParameter(uint32_t base)
{
EALLOW;
HWREG(base + PMBUS_O_PMBTIMCTL) &= ~(uint32_t)PMBUS_PMBTIMCTL_TIM_OVERRIDE;
EDIS;
}
//*****************************************************************************
//
// Check if the PMBus interface is busy
//
// param: status is the value read from the PMBus status register
//
// return Interface is free returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isUnitFree(uint32_t status)
{
return(((status & PMBUS_PMBSTS_UNIT_BUSY) == 0U) ? true : false);
}
//*****************************************************************************
//
// Check if the PMBus SCL pin is high or low
//
// param: status is the value read from the PMBus status register
//
// return SCL is high returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isSCLHigh(uint32_t status)
{
return(((status & PMBUS_PMBSTS_SCL_RAW) == 0U) ? false : true);
}
//*****************************************************************************
//
// Check if the PMBus SDA pin is high or low
//
// param: status is the value read from the PMBus status register
//
// return SDA is high returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isSDAHigh(uint32_t status)
{
return(((status & PMBUS_PMBSTS_SDA_RAW) == 0U) ? false : true);
}
//*****************************************************************************
//
// Check if the PMBus bus is free
//
// param: status is the value read from the PMBus status register
//
// return Bus is free returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isBusFree(uint32_t status)
{
return(((status & PMBUS_PMBSTS_BUS_FREE) == 0U) ? false : true);
}
//*****************************************************************************
//
// Check if the PMBus received NACK
//
// param: status is the value read from the PMBus status register
//
// return NACK is received returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isNackReceived(uint32_t status)
{
return(((status & PMBUS_PMBSTS_NACK)) ? true : false);
}
//*****************************************************************************
//
// Check if the PMBus received EOM
//
// param: status is the value read from the PMBus status register
//
// return EOM is received returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isEOMReceived(uint32_t status)
{
return(((status & PMBUS_PMBSTS_EOM)) ? true : false);
}
//*****************************************************************************
//
// Check if the PMBus received data ready
//
// param: status is the value read from the PMBus status register
//
// return data ready is received returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isDataReadyReceived(uint32_t status)
{
return(((status & PMBUS_PMBSTS_DATA_READY)) ? true : false);
}
//*****************************************************************************
//
// Check if the PMBus received data request
//
// param: status is the value read from the PMBus status register
//
// return data request is received returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isDataRequestReceived(uint32_t status)
{
return(((status & PMBUS_PMBSTS_DATA_REQUEST)) ? true : false);
}
//*****************************************************************************
//
// Check if the PMBus received ACK
//
// param: status is the value read from the PMBus status register
//
// return ACK is received returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isAckReceived(uint32_t status)
{
return(((status & PMBUS_PMBSTS_NACK)) ? false : true);
}
//*****************************************************************************
//
// Check if the PMBus lost arbitration
//
// param: status is the value read from the PMBus status register
//
// return PMBus controller lost arbitration returns true, otherwise false.
//
//*****************************************************************************
static inline bool PMBus_isArbitrationLost(uint32_t status)
{
return(((status & PMBUS_PMBSTS_LOST_ARB)) ? true : false);
}
//*****************************************************************************
//
// Write a byte of data to EEPROM
//
// param: eepromAddress is the EEPROM memory address
// param: data is the byte data to be written
//
// return API execution status
// SUCCESS - Returned for successful completion
// BUS_BUSY_ERROR - Returned if error due to busy being busy
// ARBITRATION_LOST_ERROR - Returned if error due to losing arbitration
// TARGET_NOT_READY_ERROR - Returned if received NACK from target
//
//*****************************************************************************
extern uint16_t PMBusEEPROM_writeByte(uint16_t eepromAddress, uint16_t data);
//*****************************************************************************
//
// Write a page of data to EEPROM
//
// param: eepromAddress is the EEPROM memory address
// param: pbuffer is a pointer to an array of data
// param: numOfBytes is the number of bytes of data in the buffer
//
// return API execution status
// SUCCESS - Returned for successful completion
// BUS_BUSY_ERROR - Returned if error due to busy being busy
// ARBITRATION_LOST_ERROR - Returned if error due to losing arbitration
// TARGET_NOT_READY_ERROR - Returned if received NACK from target
//
//*****************************************************************************
extern uint16_t PMBusEEPROM_writePage(uint16_t eepromAddress, uint16_t *pbuffer,
uint16_t numOfBytes);
//*****************************************************************************
//
// Read data from current EEPROM address
//
// param: pbuffer is a pointer to an array for storing received data
// param: numOfBytes is the number of bytes to read (1 to 4 bytes)
//
// return API execution status
// SUCCESS - Returned for successful completion
// BUS_BUSY_ERROR - Returned if error due to busy being busy
// ARBITRATION_LOST_ERROR - Returned if error due to losing arbitration
// TARGET_NOT_READY_ERROR - Returned if received NACK from target
//
//*****************************************************************************
extern uint16_t PMBusEEPROM_readCurrentAddress(uint16_t* pbuffer,
byteCount_t numOfBytes);
//*****************************************************************************
//
// Read up to 4 bytes of data from EEPROM address
//
// param: eepromAddress is the EEPROM memory address
// param: pbuffer is a pointer to an array for storing received data
// param: numOfBytes is the number of bytes to read (1 to 4 bytes)
//
// return API execution status
// SUCCESS - Returned for successful completion
// BUS_BUSY_ERROR - Returned if error due to busy being busy
// ARBITRATION_LOST_ERROR - Returned if error due to losing arbitration
// TARGET_NOT_READY_ERROR - Returned if received NACK from target
//
//*****************************************************************************
extern uint16_t PMBusEEPROM_performSequentialRead(uint16_t eepromAddress,
uint16_t* pbuffer,
uint16_t numOfBytes);
//*****************************************************************************
//
// Read up to 255 bytes of data starting from EEPROM address
//
// param: eepromAddress is the EEPROM memory address
// param: pbuffer is a pointer to an array for storing received data
// param: numOfBytes is the number of bytes to read (1 to 255 bytes)
//
// return API execution status
// SUCCESS - Returned for successful completion
// BUS_BUSY_ERROR - Returned if error due to busy being busy
// ARBITRATION_LOST_ERROR - Returned if error due to losing arbitration
// TARGET_NOT_READY_ERROR - Returned if received NACK from target
//
//*****************************************************************************
extern uint16_t PMBusEEPROM_performRandomRead(uint16_t eepromAddress,
uint16_t * pbuffer,
byteCount_t numOfBytes);
//*****************************************************************************
//
// Wait for PMBus target ACK or NACK
//
//
// return API execution status
// SUCCESS - Returned for successful completion (ACK)
// TARGET_NOT_READY_ERROR - Returned if received NACK from target
//
//*****************************************************************************
extern uint16_t PMBusEEPROM_waitForAck(void);
//*****************************************************************************
//
// Transmit only the Target Address + EEPROM Address (No Data)
//
// param: eepromAddress is the EEPROM memory address
//
// return API execution status
// SUCCESS - Returned for successful completion
// BUS_BUSY_ERROR - Returned if error due to busy being busy
// ARBITRATION_LOST_ERROR - Returned if error due to losing arbitration
// TARGET_NOT_READY_ERROR - Returned if received NACK from target
//
//*****************************************************************************
extern uint16_t PMBusEEPROM_transmitAddress(uint16_t eepromAddress);
#endif // PMBUSEEPROM_H
//
// End of file
//
@@ -0,0 +1,185 @@
//###########################################################################
//
// FILE: pmbus_examples_setup.h
//
// TITLE: PMBus Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef PMBUS_EXAMPLES_SETUP_H
#define PMBUS_EXAMPLES_SETUP_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Includes
//
#include <stdint.h>
#include "device.h"
#include "pmbus_examples_defines.h"
//*****************************************************************************
//
//!
//! \defgroup PMBUS_EXAMPLES_SETUP PMBus Examples Setup Code
//
//!
//! \ingroup PMBUS_EXAMPLES_SETUP
// @{
//
//*****************************************************************************
//
// Defines
//
#define NTESTS 21U
#define NENABLEDTESTS 19U
#define TARGET_ADDRESS 0x6AU
#define TARGET_2_ADDRESS 0x39U
#define TARGET_ADDRESSMASK 0x7FU
#define ALERT_RESPONSE_ADDRESS 0x0CU
#define PMBUS_ENABLE_WRITE 0U
#define DATA_BYTE_COUNT 255U
//
// Send Byte Test
//
#define TEST1_DATA_BYTE 0x55U
//
// Write Byte Test
//
#define TEST2_DATA_BYTE 0xAAU
//
// Write Word Test
//
#define TEST3_DATA_BYTE_1 0xAAU
#define TEST3_DATA_BYTE_2 0x7EU
//
// Receive Byte Test
//
#define TEST5_DATA_BYTE 0x55U
//
// Process Call Test
//
#define TEST14_DATA_BYTE_1 0xAAU
#define TEST14_DATA_BYTE_2 0x7EU
#define TEST14_XOR_MASK 0x55U
//
// Group Command Test
//
#define TEST17_2BYTES 2U
//
// Extended Write Word Test
//
#define TEST19_2BYTES 2U
#define TEST19_4BYTES 4U
//
// Extended Read Byte Test
//
#define TEST20_2BYTES 2U
//
// Extended Read Word Test
//
#define TEST21_2BYTES 2U
//
// Generic Test Command XOR Masks
//
#define CMD_XOR_MASK_V1 0xFFU
#define CMD_XOR_MASK_V2 0x55U
#define CMD_XOR_MASK_V3 1U
#define CMD_XOR_MASK_V4 2U
//*****************************************************************************
//
//! Setup GPIO pins for PMBUS mode of operation
//!
//! This function configures the GPIO muxing for PMBus.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBusExample_setupGPIO(void);
//*****************************************************************************
//
//! Setup System Control
//!
//! This function disables the watchdog, enables device PLL, and PMBus
//! peripheral clock.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBusExample_setupSysCtrl(void);
//*****************************************************************************
//
//! Setup Interrupts
//!
//! \param pmbusISR is the handle to the PMBus ISR function
//!
//! This function enables device and PMBus interrupts. Additionally, the PMBus
//! ISR handler is registered.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBusExample_setupInterrupts(void(*pmbusISR)(void));
//*****************************************************************************
//
//! Setup Flash
//!
//! This function initializes the flash module.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBusExample_setupFlash(void);
//*****************************************************************************
//
//! Done Function
//!
//! This function is an infinite loop which is run at the end of testing.
//!
//! \return None.
//
//*****************************************************************************
extern void
done(void);
#ifdef __cplusplus
}
#endif // extern "C"
//@} // ingroup
#endif // end of PMBUS_EXAMPLES_SETUP_H definition
// End of File
@@ -0,0 +1,188 @@
//###########################################################################
//
// FILE: pmbus_over_i2c_examples_setup.h
//
// TITLE: PMBus over I2C Examples Common Code
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef PMBUS_OVER_I2C_EXAMPLES_SETUP_H
#define PMBUS_OVER_I2C_EXAMPLES_SETUP_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//
// Includes
//
#include <stdint.h>
#include "device.h"
#include "pmbus_examples_defines.h"
//*****************************************************************************
//
//!
//! \defgroup PMBUS_OVER_I2C_EXAMPLES_SETUP PMBus over I2C Examples Setup Code
//
//!
//! \ingroup PMBUS_OVER_I2C_EXAMPLES_SETUP
// @{
//
//*****************************************************************************
//
// Defines
//
#define NTESTS 14U
#define NENABLEDTESTS 14U
#define TARGET_ADDRESS 0x6AU
#define TARGET_2_ADDRESS 0x39U
#define TARGET_ADDRESSMASK 0x7FU
#define ALERT_RESPONSE_ADDRESS 0x0CU
#define PMBUS_ENABLE_WRITE 0U
#define DATA_BYTE_COUNT 255U
//
// Send Byte Test
//
#define TEST1_DATA_BYTE 0x55U
//
// Write Byte Test
//
#define TEST2_DATA_BYTE 0xAAU
//
// Write Word Test
//
#define TEST3_DATA_BYTE_1 0xAAU
#define TEST3_DATA_BYTE_2 0x7EU
//
// Receive Byte Test
//
#define TEST5_DATA_BYTE 0x55U
//
// Process Call Test
//
#define TEST14_DATA_BYTE_1 0xAAU
#define TEST14_DATA_BYTE_2 0x7EU
#define TEST14_XOR_MASK 0x55U
//
// Group Command Test
//
#define TEST17_2BYTES 2U
//
// Extended Write Word Test
//
#define TEST19_2BYTES 2U
#define TEST19_4BYTES 4U
//
// Extended Read Byte Test
//
#define TEST20_2BYTES 2U
//
// Extended Read Word Test
//
#define TEST21_2BYTES 2U
//
// Generic Test Command XOR Masks
//
#define CMD_XOR_MASK_V1 0xFFU
#define CMD_XOR_MASK_V2 0x55U
#define CMD_XOR_MASK_V3 1U
#define CMD_XOR_MASK_V4 2U
//*****************************************************************************
//
//! Setup GPIO pins for PMBUS mode of operation
//!
//! This function configures the GPIO muxing for PMBus.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBus_over_I2C_Example_setupGPIO(void);
//*****************************************************************************
//
//! Setup System Control
//!
//! This function disables the watchdog, enables device PLL, and PMBus
//! peripheral clock.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBus_over_I2C_Example_setupSysCtrl(void);
//*****************************************************************************
//
//! Setup Interrupts
//!
//! \param pmbusISR is the handle to the PMBus ISR function
//!
//! This function enables device and PMBus interrupts. Additionally, the PMBus
//! ISR handler is registered.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBus_over_I2C_Example_setupInterrupts(void(*pmbusISR)(void),void(*pmbusRxFIFOISR)(void));
extern void
PMBus_over_I2C_Example_setupInterrupts_Controller(void(*pmbusISR)(void));
//*****************************************************************************
//
//! Setup Flash
//!
//! This function initializes the flash module.
//!
//! \return None.
//
//*****************************************************************************
extern void
PMBus_over_I2C_Example_setupFlash(void);
//*****************************************************************************
//
//! Done Function
//!
//! This function is an infinite loop which is run at the end of testing.
//!
//! \return None.
//
//*****************************************************************************
extern void
done(void);
#ifdef __cplusplus
}
#endif // extern "C"
//@} // ingroup
#endif // end of PMBUS_EXAMPLES_SETUP_H definition
// End of File
@@ -0,0 +1,295 @@
//###########################################################################
//
// FILE: main.c
//
// TITLE: PMBUS over I2C Controller Demo Code
//
// Note: Requires connection to PMBus target running PMBus over I2C target demo
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_controller_test.h"
//
// Defines
//
#define ZERO_BYTES 0U
#define FOUR_BYTES 4U
#define PMBSTS_EOM_S 5U
#define PMBSTS_NACK_S 6U
#define PMBSTS_DATAREQUEST_S 4U
#define PMBSTS_PEC_VALID_S 7U
#define PMBSTS_ALERT_EDGE_S 16U
#define PMBSTS_CLK_LOW_TIMEOUT_S 8U
//
// Globals
//
PMBus_StackObject pmbusStackController;
PMBus_StackHandle pmbusStackControllerHandle = &pmbusStackController;
uint16_t pmbusControllerBuffer[256];
uint16_t pmbusCRCBuffer[5];
uint16_t pmbusCRCMsgSize =0;
volatile bool targetAckReceived = false;
volatile bool controllerDataAvailable = false;
volatile bool controllerDataRequested = false;
volatile bool receivedPecValid = false;
volatile bool endOfMessage = false;
volatile bool alertEdgeAsserted = false;
volatile bool clockLowTimeout = false;
volatile bool intFlag = false;
volatile uint16_t bytesReceived = ZERO_BYTES;
volatile uint32_t busStatus = 0UL;
volatile int16_t pass = 0U, fail = 0U;
volatile bool allBytesReceived = false;
//
// Function Prototypes
//
#ifdef __cplusplus
#pragma CODE_SECTION(".TI.ramfunc")
#else
#pragma CODE_SECTION(PMBus_over_I2C_IntHandler, ".TI.ramfunc")
#pragma CODE_SECTION(PMBusoverI2CFIFOIntHandler, ".TI.ramfunc")
#endif // __cplusplus
__interrupt void PMBus_over_I2C_IntHandler(void);
__interrupt void PMBusoverI2CFIFOIntHandler(void);
//
// Main
//
int main(void)
{
//
// Locals
//
uint16_t i, counter;
#if defined(_FLASH)
//
// Setup the Flash banks
//
PMBus_over_I2C_Example_setupFlash();
#endif // _FLASH
//
// Setup the system clocking
//
PMBus_over_I2C_Example_setupSysCtrl();
//
// Enable the PMBUS GPIOs
//
PMBus_over_I2C_Example_setupGPIO();
//
// Setup the interrupt tables, register PMBUS interrupt handler
//
PMBus_over_I2C_Example_setupInterrupts_Controller(PMBus_over_I2C_IntHandler);
//
// Setup the PMBUS Library Stack Object
//
PMBusStackObject_setMode(pmbusStackControllerHandle, PMBUS_STACK_MODE_CONTROLLER);
PMBusStackObject_setTargetAddress(pmbusStackControllerHandle, TARGET_ADDRESS);
PMBusStack_initModule(pmbusStackControllerHandle, I2CA_BASE,
&pmbusControllerBuffer[0], &pmbusCRCBuffer[0]);
//
// I2C configuration. Use a 400kHz I2CCLK with a 50% duty cycle.
//
I2C_initController(I2CA_BASE, DEVICE_SYSCLK_FREQ, 400000, I2C_DUTYCYCLE_50);
//
// Call each test sequentially and check the outputs
//
for(i = 0; i < NTESTS; i++)
{
//
// Clear the buffer
// Set the buffer to some default non-zero value
//
memset(pmbusControllerBuffer, 0xBAADU, sizeof(pmbusControllerBuffer));
handle = &PMBUS_TESTS[i];
handle->init = (void (*)(void *))initTestList[i];
handle->run = (void (*)(void *))runTestList[i];
if(handle->init != NULL)
{
handle->init(handle);
}
//
// Reset pass, fail statuses
//
handle->pass = 0;
handle->fail = 0;
//
// Run test when enabled
//
if(handle->enabled == true)
{
//
// Run test
//
handle->run(handle);
//
// Wait some time to allow the target to complete processing the
// transaction before proceeding
//
for(counter = 0U; counter < 1000U; counter++)
{
}
//
// Tally the pass/fail metrics
//
pass += handle->pass;
fail += handle->fail;
//
// Halt debugger if test failed
//
if(handle->fail > 0U)
{
__asm(" ESTOP0");
}
}
//
// Test is disabled
//
else
{
handle->pass = -1;
handle->fail = -1;
}
}
//
// Tests complete - Enter wait loop
//
done();
//
// Code does not reach this point
//
return(1);
}
//
// pmbusIntHandler - This is the main PMBus interrupt handler. Read out the data
// from the PMBus module status register and acknowledge the
// interrupt.
//
__interrupt void PMBus_over_I2C_IntHandler(void)
{
//
// Read the PMBus module status register
//
busStatus = I2C_getStatus(I2CA_BASE);
//
// Write to the PMBUS_STACK object
//
PMBusStackObject_setModuleStatus(pmbusStackControllerHandle, busStatus);
//
// Read out individual status information into global variables
//
//bytesReceived = (busStatus & PMBUS_PMBSTS_RD_BYTE_COUNT_M) >>
// PMBUS_PMBSTS_RD_BYTE_COUNT_S;
bytesReceived = I2C_getRxFIFOStatus(I2CA_BASE);
//endOfMessage = (bool)((busStatus & PMBUS_PMBSTS_EOM) >> PMBSTS_EOM_S);
endOfMessage = (bool)(busStatus & I2C_STS_STOP_CONDITION);
intFlag = (bool)(busStatus & I2C_STS_REG_ACCESS_RDY);
if(endOfMessage == true)
{
I2C_clearStatus(I2CA_BASE, I2C_STS_STOP_CONDITION);
I2C_clearInterruptStatus(I2CA_BASE, I2C_STS_STOP_CONDITION );
}
targetAckReceived = ~(bool)((busStatus & I2C_STS_NACK_SENT));
// controllerDataRequested = (bool)((busStatus & PMBUS_PMBSTS_DATA_REQUEST) >>
// PMBSTS_DATAREQUEST_S);
// receivedPecValid = (bool)((busStatus & PMBUS_PMBSTS_PEC_VALID) >>
// PMBSTS_PEC_VALID_S);
// alertEdgeAsserted = (bool)((busStatus & PMBUS_PMBSTS_ALERT_EDGE) >>
// PMBSTS_ALERT_EDGE_S);
// clockLowTimeout = (bool)((busStatus & PMBUS_PMBSTS_CLK_LOW_TIMEOUT) >>
// PMBSTS_CLK_LOW_TIMEOUT_S);
//
// Check if data is available for controller
// (Bytes of data received isn't zero or is equal to 4 bytes with
// data ready status set)
//
if((bytesReceived != ZERO_BYTES) ||
((bytesReceived == FOUR_BYTES) &&
((busStatus & I2C_STS_RX_DATA_RDY) != 0U)))
{
controllerDataAvailable = true;
}
//
// ACK any pending interrupts (if any got set)
//
Interrupt_clearACKGroup(I2C_INT_ACK);
}
__interrupt void PMBusoverI2CFIFOIntHandler(void)
{
//PMBus_StackHandle handle = pmbusStackTargetHandle;
uint32_t base = PMBusStackObject_getModuleBase(pmbusStackControllerHandle);
uint16_t *buffer = PMBusStackObject_getBufferPointer(pmbusStackControllerHandle);
static uint16_t nBytes = 0U;
static uint16_t TotalBytesToReceive=0U;
static bool first_time = true;
if(first_time)
{
nBytes += PMBus_over_I2C_getTargetData(base, buffer) -1; //remove the data count byte
TotalBytesToReceive = buffer[0]; //first byte is the data count
first_time = false;
}
else
{
while(allBytesReceived==false)
{
nBytes += PMBus_over_I2C_getTargetData(base, buffer);
if (nBytes == TotalBytesToReceive)
{
allBytesReceived = true;
}
}
}
PMBusStackObject_setCurrentPositionPointer(pmbusStackControllerHandle, &buffer[nBytes]);
I2C_clearInterruptStatus(base,I2C_INT_RXFF);
Interrupt_clearACKGroup(I2C_INT_ACK);
}
//
// End of File
//
@@ -0,0 +1,71 @@
//###########################################################################
//
// FILE: pmbus_over_i2c_controller_test.c
//
// TITLE: Various controller transactions for testing target state machine
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_controller_test.h"
//
// Globals
//
PMBus_TestObject PMBUS_TESTS[NTESTS];
PMBus_TestHandle handle;
void (*initTestList[NTESTS])(PMBus_TestHandle) =
{
PMBusController_initQuickCommandTest,
PMBusController_initSendByteTest,
PMBusController_initWriteByteTest,
PMBusController_initWriteWordTest,
PMBusController_initReceiveByteTest,
PMBusController_initReadByteTest,
PMBusController_initReadWordTest,
PMBusController_initExtendedWriteByteTest,
PMBusController_initExtendedWriteWordTest,
PMBusController_initExtendedReadByteTest,
PMBusController_initExtendedReadWordTest,
PMBusController_initProcessCallTest,
PMBusController_initBlockReadTest,
PMBusController_initBlockWriteTest
};
void (*runTestList[NTESTS])(PMBus_TestHandle) =
{
PMBusController_runQuickCommandTest,
PMBusController_runSendByteTest,
PMBusController_runWriteByteTest,
PMBusController_runWriteWordTest,
PMBusController_runReceiveByteTest,
PMBusController_runReadByteTest,
PMBusController_runReadWordTest,
PMBusController_runExtendedWriteByteTest,
PMBusController_runExtendedWriteWordTest,
PMBusController_runExtendedReadByteTest,
PMBusController_runExtendedReadWordTest,
PMBusController_runProcessCallTest,
PMBusController_runBlockReadTest,
PMBusController_runBlockWriteTest
};
//
// End of File
//
@@ -0,0 +1,736 @@
//###########################################################################
//
// FILE: pmbus_over_i2c_controller_test.h
//
// TITLE: Various controller transactions for testing target state machine
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifndef PMBUS_OVER_I2C_CONTROLLER_TEST_H
#define PMBUS_OVER_I2C_CONTROLLER_TEST_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
//*****************************************************************************
//
//!
//! \defgroup PMBUS_OVER_I2C_CONTROLLER_TESTS PMBus over I2C Controller Mode Tests
//
//!
//! \ingroup PMBUS_OVER_I2C_CONTROLLER_TESTS
// @{
//
//*****************************************************************************
//
// Includes
//
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "pmbus_over_i2c_examples_setup.h"
#include "pmbus_stack_handler.h"
//
// Defines
//
#define ENABLE_TEST_1 1 // Send Byte
#define ENABLE_TEST_2 1 // Write Byte
#define ENABLE_TEST_3 1 // Write Word
#define ENABLE_TEST_4 1 // Block Write
#define ENABLE_TEST_5 1 // Receive Byte
#define ENABLE_TEST_6 1 // Read Byte
#define ENABLE_TEST_7 1 // Read Word
#define ENABLE_TEST_8 1 // Block Read
#define ENABLE_TEST_9 1 // Block Write/ Read/ Process Call
#define ENABLE_TEST_10 1 // Quick Command
#define ENABLE_TEST_11 1 // Block Write (command, byte count, 2 bytes)
// - this is actually a write word
#define ENABLE_TEST_12 1 // Block Write (command, byte count, 3 bytes)
#define ENABLE_TEST_13 1 // Block Read (3 bytes)
#define ENABLE_TEST_14 1 // Process call (write word then read word)
#define ENABLE_TEST_15 1 // Alert
#define ENABLE_TEST_16 0 // Alert (from non-existent target)
#define ENABLE_TEST_17 1 // Group Command (target 1st to be addressed)
#define ENABLE_TEST_18 1 // Extended Write Byte
#define ENABLE_TEST_19 1 // Extended Write Word
#define ENABLE_TEST_20 1 // Extended Read Byte
#define ENABLE_TEST_21 1 // Extended Read Word
#define TARGET_ADDRESS_MASK 0xFEU
//
// Typedefs
//
//*****************************************************************************
//
//! PMBUS_TEST structure
//
//*****************************************************************************
typedef struct
{
uint16_t count; //!< #bytes (block transactions > 4)
int16_t pass; //!< pass metric
int16_t fail; //!< fail metric
bool enabled; //!< bool if this test is enabled or not
void (*init)(void *); //!< Function pointer to test init routine
void (*run)(void *); //!< Function pointer to test run routine
} PMBus_TestObject;
//*****************************************************************************
//
//! Handle to the PMBUS_TEST structure
//
//*****************************************************************************
typedef PMBus_TestObject *PMBus_TestHandle;
//
// Globals
//
extern PMBus_TestObject PMBUS_TESTS[NTESTS];
extern PMBus_TestHandle handle;
extern void (*runTestList[NTESTS])(PMBus_TestHandle);
extern void (*initTestList[NTESTS])(PMBus_TestHandle);
extern volatile int16_t pass, fail;
extern PMBus_StackObject pmbusStackController;
extern PMBus_StackHandle pmbusStackControllerHandle;
extern uint16_t pmbusControllerBuffer[256];
extern uint16_t pmbusCRCMsgSize;
extern volatile bool targetAckReceived;
extern volatile bool endOfMessage;
extern volatile bool controllerDataAvailable;
extern volatile bool controllerDataRequested;
extern volatile bool receivedPecValid;
extern volatile bool alertEdgeAsserted;
extern volatile bool clockLowTimeout;
extern volatile bool intFlag;
extern volatile uint16_t bytesReceived;
extern volatile uint32_t pmbusStatus;
extern volatile bool allBytesReceived;
//
// Function Prototypes
//
//extern void I2CController_Transmit(uint32_t base, uint16_t *buffer, uint16_t nBytes);
extern void I2C_configController(uint32_t base);
//*****************************************************************************
//
//! Reset the global PMBus module flags
//!
//! \return None.
//
//*****************************************************************************
static inline void
PMBusController_resetGlobalFlags(void)
{
targetAckReceived = false;
endOfMessage = false;
controllerDataAvailable = false;
controllerDataRequested = false;
receivedPecValid = false;
alertEdgeAsserted = false;
clockLowTimeout = false;
bytesReceived = 0U;
}
//*****************************************************************************
//
//! Reset the PMBus Stack Object Test Statues and Counts
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
static inline void
PMBusController_resetTestObject(PMBus_TestHandle handle)
{
handle->count = 0U;
handle->pass = 0U;
handle->fail = 0U;
handle->enabled = false;
}
//*****************************************************************************
//
//! Initialize the "Send Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initSendByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Send Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runSendByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Write Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Write Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Write Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Write Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWriteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWriteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Receive Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initReceiveByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Receive Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 2
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runReceiveByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Read Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Read Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 3
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Read Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Read Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Read" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockReadTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Read" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 258
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockReadTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Read (3 Bytes)" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockRead3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Read (3 Bytes)" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 6
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockRead3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write, Block Read, Process Call" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWriteReadProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write, Block Read, Process Call" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 258
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWriteReadProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Quick Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initQuickCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Quick Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runQuickCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write (2 Bytes)" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWrite2BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write (2 Bytes)" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWrite2BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Block Write (3 Bytes)" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initBlockWrite3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Block Write (3 Bytes)" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runBlockWrite3BytesTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Process Call" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Process Call" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runProcessCallTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Alert" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Alert" Response Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "No Alert" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initNoAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "No Alert" Response Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note This test requires a 2nd PMBus target on the network asserting the
//! alert line.
//! \note Expected pass value: 5
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runNoAlertTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Group Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initGroupCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Group Command" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runGroupCommandTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Write Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Write Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedWriteByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Write Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Write Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 1
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedWriteWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Read Byte" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Read Byte" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 3
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedReadByteTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Initialize the "Extended Read Word" Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_initExtendedReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
//! Run the "Extended Read Word" Command Test
//!
//! \param handle is the handle to the PMBus stack object
//!
//! \note Expected pass value: 4
//!
//! \return None.
//
//*****************************************************************************
void
PMBusController_runExtendedReadWordTest(PMBus_TestHandle handle);
//*****************************************************************************
//
// Close the Doxygen group.
// @}
//
//*****************************************************************************
//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif
#endif // PMBUS_CONTROLLER_TEST_H
@@ -0,0 +1,131 @@
//###########################################################################
//
// FILE: pmbus_over_i2c_lib.c.h
//
// TITLE: I2C Functions used in PMBUS Communications Stack
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifdef PMBUS_OVER_I2C
//
// Includes
//
#include "pmbus_over_i2c_lib.h"
void I2CWrite(uint32_t base, uint16_t targetAddr, uint16_t *pTXbuff, uint16_t byteCount, bool sendStopCondition)
{
I2C_enableInterrupt(base, I2C_INT_STOP_CONDITION | I2C_INT_NO_ACK | I2C_INT_ARB_LOST);
//Disable and enable FIFO to flush any previous I2C transaction
I2C_disableFIFO(base);
I2C_enableFIFO(base);
I2C_setTargetAddress(base, targetAddr);
//Controller Transmit mode + Repeat mode
//I2CCNT register settings are ignored
I2C_setConfig(base, I2C_CONTROLLER_SEND_MODE);
I2C_setDataCount(base, byteCount);
I2C_setFIFOInterruptLevel(base, I2C_FIFO_TXEMPTY, I2C_FIFO_RXFULL);
uint16_t numofSixteenByte = byteCount / I2C_FIFO_TXFULL;
uint16_t remainingBytes = byteCount % I2C_FIFO_TXFULL;
uint16_t count = 0;
uint16_t i = 0;
uint16_t buff_pos = 0;
I2C_sendStartCondition(base);
while(count < numofSixteenByte)
{
for(i=1;i<=I2C_FIFO_TXFULL;i++)
{
I2C_putData(base, pTXbuff[buff_pos++]);
}
//Wait till TX FIFO contents are transmitted
while(WAIT_TILL_TX_FIFO_IS_EMPTY);
count++;
}
for (i=0; i < remainingBytes; i++)
{
I2C_putData(base, pTXbuff[buff_pos++]);
}
//Wait till TX FIFO contents are transmitted
while(WAIT_TILL_TX_FIFO_IS_EMPTY);
if(sendStopCondition)
{
I2C_sendStopCondition(base);
while(I2C_getStopConditionStatus(base));
I2C_clearStatus(base, I2C_STS_STOP_CONDITION | I2C_STS_NO_ACK | I2C_STS_BYTE_SENT);
}
}
uint16_t I2CRead(uint32_t base, uint16_t targetAddr, uint16_t *pRXbuff, uint16_t byteCount, bool sendStopCondition)
{
I2C_enableInterrupt(base, I2C_INT_STOP_CONDITION | I2C_INT_NO_ACK | I2C_INT_ARB_LOST);
//Disable and enable FIFO to flush any previous I2C transaction
I2C_disableFIFO(base);
I2C_enableFIFO(base);
I2C_setTargetAddress(base, targetAddr);
//Controller Receiver mode + Repeat mode
//I2CCNT register settings are ignored
I2C_setConfig(base, I2C_CONTROLLER_RECEIVE_MODE);
I2C_setDataCount(base, byteCount);
I2C_sendStartCondition(base);
I2C_setFIFOInterruptLevel(base, I2C_FIFO_TXEMPTY, I2C_FIFO_RXFULL);
uint16_t numofSixteenByte = byteCount / I2C_FIFO_RXFULL;
uint16_t remainingBytes = byteCount % I2C_FIFO_RXFULL;
uint16_t count = 0;
uint16_t i = 0;
uint16_t buff_pos = 0;
while(count < numofSixteenByte)
{
while(WAIT_TILL_RX_FIFO_IS_FULL);
for(i=0;i<I2C_FIFO_RXFULL;i++)
{
pRXbuff[buff_pos++] = I2C_getData(base);
count++;
}
}
while(WAIT_TILL_RX_FIFO_HAS(remainingBytes));
for(i=0; i<remainingBytes; i++)
{
pRXbuff[buff_pos++] = I2C_getData(base);
count++;
}
if(sendStopCondition)
{
I2C_sendStopCondition(base);
while(I2C_getStopConditionStatus(base));
I2C_clearStatus(base, I2C_STS_STOP_CONDITION | I2C_STS_NO_ACK | I2C_STS_BYTE_SENT);
}
return count;
}
#endif
@@ -0,0 +1,48 @@
//###########################################################################
//
// FILE: pmbus_over_i2c_lib.h
//
// TITLE: I2C Functions used in PMBUS Communications Stack
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
#ifdef PMBUS_OVER_I2C
#ifndef PMBUS_OVER_I2C_LIB_H
#define PMBUS_OVER_I2C_LIB_H
//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif
#include "device.h"
#define WAIT_TILL_TX_FIFO_IS_EMPTY I2C_getTxFIFOStatus(base)
#define WAIT_TILL_RX_FIFO_IS_FULL !(I2C_getRxFIFOStatus(base) == I2C_FIFO_RXFULL)
#define WAIT_TILL_RX_FIFO_HAS(x) !(I2C_getRxFIFOStatus(base) == x)
void I2CWrite(uint32_t base, uint16_t targetAddr, uint16_t *pTXbuff, uint16_t byteCount, bool sendStopCondition);
uint16_t I2CRead(uint32_t base, uint16_t targetAddr, uint16_t *pRXbuff, uint16_t byteCount, bool sendStopCondition);
void I2C_sendRepeatedStartCondition(uint32_t base, uint16_t config);
#ifdef __cplusplus
}
#endif
#endif // PMBUS_OVER_I2C_LIB_H
#endif // PMBUS_OVER_I2C
@@ -0,0 +1,128 @@
//###########################################################################
//
// FILE: test_block_read.c
//
// TITLE: Block Read (16 bytes) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_controller_test.h"
#include "pmbus_over_i2c_lib.h"
//*****************************************************************************
//
// PMBusController_initBlockReadTest
//
//*****************************************************************************
void PMBusController_initBlockReadTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 16
//
handle->count = 16U;
//
// Enable the test
//
#if ENABLE_TEST_8 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_8 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockReadTest
//
//*****************************************************************************
void PMBusController_runBlockReadTest(PMBus_TestHandle handle)
{
//
// Locals //
uint16_t nBytes = 0U;
uint16_t i = 0U;
uint32_t base = I2CA_BASE;
bytesReceived = 0U;
volatile uint16_t byteCount =0U;
uint16_t buff_pos = 1;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0xBAADU, handle->count * sizeof(uint16_t));
//
// Do a read byte
// Config the controller to send a read-block command (by asserting the command
// bit) and then to issue a repeated start followed by a read (i.e. enable
// read) and get handle->count data bytes and a PEC from the target. Also
// enable PEC proecessing on the controller side to verify the PEC
//
//
// Load the command byte into the transmit register,
// in this case the PMBUS_CMD_READ_EIN command
//
pmbusControllerBuffer[0] = PMBUS_CMD_READ_EIN;
I2CWrite(base, TARGET_ADDRESS, pmbusControllerBuffer, 1, false);
// Get the response - first byte is the data count
nBytes = I2CRead(base, TARGET_ADDRESS, pmbusControllerBuffer, handle->count, true);
I2C_clearStatus(base, I2C_STS_STOP_CONDITION | I2C_STS_NO_ACK | I2C_STS_BYTE_SENT);
//
// Check that we got nBytes (byte count) bytes
//
(nBytes == handle->count ) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == handle->count) ? handle->pass++ : handle->fail++;
for(i = 1U; i < handle->count; i++)
{
if(pmbusControllerBuffer[i] == (PMBUS_CMD_READ_EIN ^ i))
{
handle->pass++;
}
else
{
handle->fail++;
}
}
//(receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != (handle->count +1U))
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,258 @@
//###########################################################################
//
// FILE: test_block_write.c
//
// TITLE: Block Write (255 bytes) Test
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_controller_test.h"
#include "pmbus_over_i2c_lib.h"
//*****************************************************************************
//
// PMBusController_initBlockWriteTest
//
//*****************************************************************************
void PMBusController_initBlockWriteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set the block length to 255
//
handle->count = 255U;
//
// Enable the test
//
#if ENABLE_TEST_4 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_4 == 1
}
//*****************************************************************************
//
// PMBusController_runBlockWriteTest
//
//*****************************************************************************
#if 0
void PMBusController_runBlockWriteTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t i = 0U;
uint32_t base = I2CA_BASE;
uint32_t bytes_sent = 0U;
//
// Set command in buffer
//
pmbusControllerBuffer[0] = PMBUS_CMD_VIN_OV_FAULT_LIMIT;
pmbusControllerBuffer[1] = handle->count;
for(i = 2U; i <= handle->count; i++)
{
//
// Bytes #0 to #N-1 (254)
//
pmbusControllerBuffer[i] = i - 1;
}
//
// Block writes must be done in chunks of 4 bytes starting with the
// command byte
//
//
// Config the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// >=3 bytes to transfer
//
//
// Transfer the first 4 bytes, i.e., command, byte #0, #1, #2
// NOTE: Byte count is automatically inserted after command
//
//PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 4U);
I2CWrite(base, TARGET_ADDRESS, pmbusControllerBuffer, 4U, false); //Write word
bytes_sent = 2U;
//
// Write the remaining bytes in chunks of 4, last transaction is N+2 % 4
//
for(i = 4U; i <= (handle->count+2U);) // 2U - one for command + one for byte count
{
//
// Wait for DATA_REQUEST to assert
//
while(controllerDataRequested == false)
{
}
controllerDataRequested = false;
//if((handle->count - i - 1U) >= 4U)
if((handle->count - bytes_sent)>=4U)
{
//
// Transfer 4 bytes at a time
//
//PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[i], 4U);
if((handle->count - bytes_sent )>4U)
{
I2CWrite(base, TARGET_ADDRESS, &pmbusControllerBuffer[i], 4U, false);
}
else
{
I2CWrite(base, TARGET_ADDRESS, &pmbusControllerBuffer[i], 4U, true); //last 4 bytes
}
i = i + 4U;
bytes_sent = bytes_sent + 4U;
}
else
{
//
// Remaing bytes < 4U
//
I2CWrite(base, TARGET_ADDRESS, &pmbusControllerBuffer[i], (handle->count -bytes_sent), true); //Write word
//PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[i],
// (handle->count + 1U - i));
i += (handle->count + 1U - i);
}
//
// NOTE: PEC is automatically inserted at the end of block write
// transmission
//
}
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
#endif
void PMBusController_runBlockWriteTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint16_t i = 0U;
uint32_t base = I2CA_BASE;
//
// Set command in buffer
//
pmbusControllerBuffer[0] = PMBUS_CMD_VIN_OV_FAULT_LIMIT;
pmbusControllerBuffer[1] = handle->count;
for(i = 2U; i <= handle->count; i++)
{
//
// Bytes #0 to #N-1 (254)
//
pmbusControllerBuffer[i] = i - 2;
}
#ifdef PEC_ENABLED
uint16_t *CRCBuffer = PMBusStackObject_getCRCBufferPointer(pmbusStackControllerHandle);
CRCBuffer[0]= TARGET_ADDRESS <<1;
pmbusCRCMsgSize = 1U;
//Calculate PEC
pmbusControllerBuffer[i+1] = calc_PEC(CRCBuffer,pmbusCRCMsgSize, pmbusControllerBuffer, handle->count);
I2CWrite(base, TARGET_ADDRESS, pmbusControllerBuffer, handle->count+3U, true); //count = command + byte_count + bytes + PEC
#else
//
// Block writes must be done in chunks of 4 bytes starting with the
// command byte
//
//
// Config the controller to enable PEC, enable Write (by omitting the read
// option from the configWord, you enable write), enable command,
// >=3 bytes to transfer
//
//
// Transfer the first 4 bytes, i.e., command, byte #0, #1, #2
// NOTE: Byte count is automatically inserted after command
//
//PMBus_putControllerData(PMBUSA_BASE, &pmbusControllerBuffer[0], 4U);
I2CWrite(base, TARGET_ADDRESS, pmbusControllerBuffer, handle->count+2U, true); //count = command + byte_count + bytes
#endif
// Wait for I2C bus to clear
while(I2C_getStopConditionStatus(base));
while(I2C_isBusBusy(base));
//
// Wait for the EOM, and target to ack the address before
// reading data -- done in the ISR
//
while(endOfMessage == false)
{
}
//
// Once the bus is free, if the target NACK'd its a failure
//
(targetAckReceived == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 1U)
{
handle->fail++;
}
return;
}
//
// End of File
//
@@ -0,0 +1,128 @@
//###########################################################################
//
// FILE: test_extended_read_byte.c
//
// TITLE: Read Byte (Extended)
//
//###########################################################################
//
//
// $Copyright: Copyright (C) 2015-2024 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################
//
// Includes
//
#include "pmbus_over_i2c_controller_test.h"
#include "pmbus_over_i2c_lib.h"
//*****************************************************************************
//
// PMBusController_initExtendedReadByteTest
//
//*****************************************************************************
void PMBusController_initExtendedReadByteTest(PMBus_TestHandle handle)
{
//
// Reset flags
//
PMBusController_resetGlobalFlags();
//
// Reset test object
//
PMBusController_resetTestObject(handle);
//
// Set count to 1
//
handle->count = 1;
//
// Enable the test
//
#if ENABLE_TEST_20 == 1
handle->enabled = true;
#else
handle->enabled = false;
#endif //ENABLE_TEST_20 == 1
}
//*****************************************************************************
//
// PMBusController_runExtendedReadByteTest
//
//*****************************************************************************
void PMBusController_runExtendedReadByteTest(PMBus_TestHandle handle)
{
//
// Locals
//
uint32_t base = I2CA_BASE;
//
// Clear the spot where the command will go
//
memset(&pmbusControllerBuffer[0], 0U, handle->count * sizeof(uint16_t));
//
// Do an extended read byte
// Config the controller to send an extended read-byte command
// (by asserting the command and extended command bits) and then to issue
// a repeated start followed by a read (i.e. enable
// read) and get a data byte and a PEC from the target. Also enable PEC
// processing on the controller side to verify the PEC
//
//
// Load the extended command and command bytes into the transmit register,
// in this case the PMBUS_CMD_OPERATION command
//
pmbusControllerBuffer[0] = PMBUS_CMD_MFR_SPECIFIC_COMMAND;
pmbusControllerBuffer[1] = PMBUS_CMD_OPERATION;
I2CWrite(base, TARGET_ADDRESS, pmbusControllerBuffer,TEST20_2BYTES, false);
#if PEC_ENABLED
handle->count+=1;
#endif
//
// Read received data
//
bytesReceived = I2CRead(base, TARGET_ADDRESS, pmbusControllerBuffer, handle->count, true);
while(I2C_isBusBusy(base));
//
// Wait for the EOM, the target transmits all its data, the
// controller NACKs it, and then issues an EOM on the bus
// -- this flag is set in the ISR
// NOTE: Although the controller issues a NACK to the target to indicate the
// end of transmission, the NACK bit (status) is not asserted at the controller
// end, only at the target end.
//
//
// Check the received byte
//
(bytesReceived == handle->count) ? handle->pass++ : handle->fail++;
(pmbusControllerBuffer[0] == (PMBUS_CMD_OPERATION ^ CMD_XOR_MASK_V1)) ?
handle->pass++ : handle->fail++;
// (receivedPecValid == true) ? handle->pass++ : handle->fail++;
//
// Check that expected pass counter value is correct
//
if(handle->pass != 2U)
{
handle->fail++;
}
return;
}
//
// End of File
//
Loaded 100 of 14950 files, more files were not shown because too many files have changed in this diff. Show more