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:GIO1A 和 GIO1B 的实施(内部模拟环回)

Guru**** 2442090 points
Other Parts Discussed in Thread: TMS570LC4357

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1275760/tms570lc4357-implementation-of-gio1a-and-gio1b-internal-analog-loopback

器件型号:TMS570LC4357

尊敬的专家:

我有一个与 TMS570LC4357安全手册中所述的诊断 GIO1A 和 GIO1B 有关的问题。
根据手册下面的应用程序。

" 数据输入和数据输出寄存器的内容将直接反映引脚的状态
I/O 方向是配置为输入还是输出。 此配置允许在软件中
用于检测已知输入状态或已知输出状态与引脚状态之间的不一致性。"

根据我的理解、这意味着将一个引脚设置为输出、然后在 GIODOUTx 中将该引脚设置为高电平、这将反映在 GIODINx 寄存器中。
例如、在以下代码示例中、始终不会将错误设置为 true、因为将 GIODOUTA 设置为0x55也会将 GIODINA 设置为0x55。

uint32_t dinValue;
uint32_t doutValue;

bool error = false;

GIO->GIODIRA = 0xFF; // Set all to Output
GIO->GIODOUTA = 0x55; // switch some outputs high

dinValue = GIO->GIODINA;
doutValue = GIO->GIODOUTA;

// Check that GIODINA is the same as GIODOUTA (internal analog loopback)
if(dinValue != doutValue)
{
    error = true
}

出于某些原因、设置 GIODOUTA 对 GIODINA 没有影响。 我缺少什么?

谢谢、此致、
最大值