This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS320F28379D:将 TI DCAN 简单传输示例复制到不同的位置、但 DCAN 不起作用

Guru**** 2564110 points
Other Parts Discussed in Thread: C2000WARE

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1314525/tms320f28379d-copy-ti-dcan-simple-transmit-example-to-a-different-place-but-dcan-doesn-t-work

器件型号:TMS320F28379D
主题中讨论的其他器件:C2000WARE

您好

我更改了 C2000ware 4.3.0.0示例(can_ex4_simple_transmit) c 文件并在 F28379D LaunchPad 上进行检查、可以正常工作。

最后、我将项目文件和相关文件复制到另一个文件夹中、按如下所示更改.proectspec 文件的内容:

<projectSpec>
  <project
        name="can_ex4_simple_transmit_F28379D"
        device="TMS320F28377D"
        cgtVersion="22.6.0.LTS"
        products="c2000ware_software_package"
        outputFormat="ELF"
        launchWizard="False"
        linkerCommandFile=""
        enableSysConfigTool="true"
        sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD"
        >
    <pathVariable name="C2000WARE_ROOT" path="C:/ti/c2000/C2000Ware_4_03_00_00" scope="project" />
    <pathVariable name="C2000WARE_DLIB_ROOT" path="${C2000WARE_ROOT}/driverlib/f2837xd/driverlib/" scope="project" />
    <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}  -v28 -ml -mt --define=_LAUNCHXL_F28379D --define=DEBUG --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2  --define=CPU1  --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  " />
    <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}  -v28 -ml -mt --define=_LAUNCHXL_F28379D --define=DEBUG --define=_FLASH --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2  --define=CPU1  --diag_warning=225  --diag_suppress=10063 --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  " />
    <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
    <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/include/device.h" targetDirectory="device" />
    <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/source/device.c" targetDirectory="device" />
    <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/targetConfigs/TMS320F28379D.ccxml" targetDirectory="targetConfigs" />
    <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
    <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
    <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
    <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="can_ex4_simple_transmit_F28379D.c" targetDirectory="" />
  </project>
</projectSpec>

e2e.ti.com/.../can_5F00_ex4_5F00_simple_5F00_transmit_5F00_F28379D.zip

在 LaunchPad 上运行程序时、无法从 CAN 接收器获得任何通信数据。

有人会为我指出错误的地方吗?

谢谢。

家开市

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Jiakai,  

    user4450126 说:
    当我在 LaunchPad 上运行程序时、无法从 CAN 接收器获得任何通信数据。

    我想如果您做到这一点、那么该项目没有任何生成错误。 如果您已更改该文件夹、则需要确保所有相对位置均已成功更新。  

    首先要检查的是 GPIO 配置是否按预期完成。 您需要检查是否已将正确的 device.h 文件链接到工程。 您需要将"_LAUNCHXL_F28379D"添加到预定义符号列表中、以确保编译器使用正确的配置。  

    如果是按顺序配置、则转到 CCS 寄存器视图并确保按预期完成配置。 您或许能够查看是否有某些寄存器没有被正确写入。  

    谢谢。  

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、Sahil:

    我已经将 _LAUNCHXL_F28379D 添加到预定义符号列表中。 我已经检查了器件文件夹下的文件、新项目中的文件与旧项目中的文件相同。

    我已检查项目属性、发现使用了 C2000ware 5.0.0.0、但.projectspec 文件指定使用 c20002are 4.3.0.0。 我已在计算机上安装了 v4.3.0.0和 v5.0.0。 当然、 我不认为这会导致程序无法正常工作。

    谢谢。

    家开市

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、Sahil:

    程序现在运行正常。 不知道原因。

    家开市