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.

[参考译文] TMS570LS0714:LIN 作为 GIO

Guru**** 2535150 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/977431/tms570ls0714-lin-as-gio

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

大家好、我想将 LIN 引脚用作 GIO、但我不确定我必须用作 GI 的寄存器。
我认为我应该使用此功能:

RD6= gioGetBit (linPORT、PIN_LIN_TX);
RD5= gioGetBit (linPORT、PIN_LIN_RX);

是这样吗? 我是否正在获取 TX 和 RX LIN 引脚的速度?

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

    我必须在一个字节中设置8位、但对于函数 gioGetBit、我有错误#41需要标识符。 此外 、linPORT 未定义。  

    uint32 RD7=gioGetBit (gioPORTB、1);//获取 BIOB[1]的当前值。 引脚133 uC。
    uint32 RD6= gioGetBit (linPORT、1);
    uint32 RD5= gioGetBit (linPORT、2);
    uint32 RD4= gioGetBit (mibspiport1、1);//获取 MIBSPI1NCS[0]的当前值。 引脚130 uC。
    uint32 RD3=canREG2->RIOC &1U;//获取该 CAN 端口(2)的 RX 引脚的当前值。 引脚129 uC
    uint32 RD2=canREG2->TIOC &1U;//获取该 CAN 端口(2)的 TX 引脚的当前值。 引脚128 uC
    uint32 RD1= gioGetBit (hetPORT1、3);//获取 N2HET1[30]的当前值。 引脚127 uC。
    INT8_t DATA = RD1 |(RD2 << 1)|(RD3 << 2)|(RD4 << 3)|(RD5 << 4)|(RD6 << 5)|(RD7 << 6);

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

    首先、在 HalCoGen 配置 Lin 选项卡中:
    LIN 端口->将 TX 引脚模式和 Rx 引脚模式更改为 GPIO。 在同一个选项卡上、您可以更改所需的方向(输入/输出)。

    在 sourcec 文件中包含 reg_gio.h。 您将找到用于 TX 和 RX 引脚的宏(例如 PIO2 ...)。

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

    您可以使用 GIO API (gioGetBit (linPORT、1)等)。 正如 Michal 提到的、您必须首先将 LINTX 和 LINRX 配置为 GIO 引脚。