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.

[参考译文] CCS/TMS570LS1224:实时更新 CANID

Guru**** 2606725 points
Other Parts Discussed in Thread: HALCOGEN

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/750491/ccs-tms570ls1224-update-canid-realtime

器件型号:TMS570LS1224
主题中讨论的其他器件:HALCOGEN

工具/软件:Code Composer Studio

您好! 


附件

e2e.ti.com/.../5265.sys_5F00_main.c

是我的 sys_main.c 文件 

我能够通过 CAN 发送200个 ID。

如果我取消注释以下行以将 ID 更改为十六进制210 (行号 81)

//canUpdateID (canREG1、canMESSAGE_BOX1、0x00000210U);

不会通过 CAN 发送消息。

帮助我使用 halcogen 生成的函数更改代码中的 ID。 我不想破坏生成的代码。

谢谢。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!
    请查看此 文档以查看它是否对您有所帮助:e2e.ti.com/.../446817

    此致、
    米罗
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    谢谢、读得很好、但运气不好。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    int main (空)

    /*用户代码开始(3)*/

    uint8 data[8]={0x11、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00};

    canInit();
    gioInit();

    a=canGetID (canREG1、canMESSAGE_BOX1);

    while (1)

    canUpdateID (canREG1、canMESSAGE_BOX1、(uint32) 0x800000U |(uint32) 0x40000000U |(uint32) 0x20000000U |(uint32)(((uint32) 0X600U &(uint32) 0x1FFFFFFFU));
    b= canTransmit (canREG1、canMESSAGE_BOX1、data);

    //canTransmit (canREG1、0x120、x);
    gioSetBit (gioPORTB、1、1);

    /*用户代码结束*/

    返回0;