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.

[参考译文] TMS570LS3137:是否可以使用 RTP 端口作为 GIO?

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1363664/tms570ls3137-is-it-possible-to-use-rtp-port-as-gio

器件型号:TMS570LS3137

尊敬的所有人:

如标题所示、RTP 端口可用作 GIO 端口吗?
我提出这个问题是因为我认为它可以像使用 HET 端口作为 GIO (输出、输入、输入 IRQ)一样使用。

我看到了一个使用 Het 端口驱动 LED 的示例源。 我可以像这样使用它吗?

空 main (void)
{
/*用户代码开始(3)*/

/*初始化 RTI 驱动程序*/
rtiInit();

/*设置高端定时器 GIO 端口 hetPort 引脚方向到所有输出*/
gioSetDirection (hetPORT1、0xFFFFFFFF);

/*启用 RTI 比较0中断通知*/
rtiEnableNotification (rtiNOTIFICATION_COMPARE0);

/*启用 IRQ -清除 CPS 寄存器中的 I 标志*/
/*注意:这通常由操作系统或在 Svc 调度程序中完成*/
_enable_irq();

/*启动 RTI 计数器块0 */
rtiStartCounter (rtiCOUNTER_BLOCK0);

/*永久运行*/
while (1);

/*用户代码结束*/

/*用户代码开始(4)*/
/*注意-您需要从 notification.c 中删除 rtiNotification 以避免重新定义*/
void rtiNotification (UINT32通知)
{
/*在用户代码 begin 和用户代码 end 之间输入用户代码。 */
/*切换 HET 引脚0 */
gioSetPort (hetPORT1、gioGetPort (hetPORT1)^ 0x00000001);

此致、
IBLEE