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.

TMS570LC4357: 关于LINRX/LINTX作为通用的GIO的设置问题

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

想实现内容:将LIN1RX和LIN1TX均作为输出管脚。

以下为初始化过程:

            linREG1->GCR0 = 1;     //让LIN处于不复位态

            gioSetDirection(linPORT1,0x06U);//根据此表格,将此TX和RX管脚都用做GIO的输出态
            gioSetPort(linPORT1,0x0);//使其输出为0。

                      将LIN1RX和LIN1TX作为输入管脚。
linREG1->GCR0 = 1;     //让LIN处于不复位态

gioSetDirection(linPORT1,0x00U);//根据此表格,将此TX和RX管脚都用做GIO的输入态

 gioSetPort(linPORT1,0x0);//使其输出为0。
gioGetPort(linPORT1);//采集当前状态。(实际采集到的值是6,即两个均为高电平。)
随后在运行过程中,对输出管脚无论设置什么,输入管脚均读到的值为两个高电平。