TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS570LC4357: Configure part of N2HET pin as GIO pin

Part Number:TMS570LC4357Other Parts Discussed in Thread:HALCOGEN

I need to configure part of N2HET pin as GIO pin to use for input signal and output signal, and some pins in N2HET2 to select to SPI module by Pin MUXing. 

How can I do this?

I notice that I can access registers of N2HET by GIO function to use this pin as GIO, but the register is set for 32 pins,  if some pin I used in another module function, what happened?

For example,

I need to use D11 H2HET2[6]  pin as GIO pin, but I also need to configure N3 H2HET2[7] as SPI pin. 

if I access this register to set pin HET2[6] as output pin, other 31 bits will be set 0 or 1 in this operation. But I don't want to change other pins direction, how can I do?

Please tell me the method to operate part pin of NHET under the condition that  doesn't affect the function of other pins?

By the way,  shall I need to enable HET driver in HALCOGen?

HL P:

PS:in N2HET2 0-31 pin, some pin can be selected to MIBSPI, I use it as SPI module, but I also need some GIO pin in these 337 ZWT.  The selection of MIBSPI I have finished in Pin MUXIng page of HALCoGen.

,

Susan Yang:

我会在确认之后给您回复

,

HL P:

期待你的回复

,

Susan Yang:

1. 配置 input pinmux : N2HET2[06] — D11,  N2HET2[07] — N3

2  使用  hetREG2->DIR |= (0x1 << 6); 来配置 N2HET2[6] 为 output

HL P 说:shall I need to enable HET driver in HALCOGen?

您不需要来 enable N2HET2

3 您可以使用 pinmux 来选择MibSPI 或N2HET 的引脚. 如果您想使用这些引脚为 GIO pin, 建议您先配置这些引脚为 N2HET pin

,

HL P:

我担心我使用 hetREG2->DIR |= (0x1 << 6) 来配置 N2HET2[6] 为 output, 这个寄存器当中的其他bit的默认值会不会对影响我对其他引脚的适用(比如将N3配置成了SPI pin, 我将在SPI的代码当中适用这个pin), 因此我不希望再我操作这个寄存器时会对这个N3 pin进行改动, 请问这个情况会发生吗?

,

Susan Yang:

HL P 说: 这个寄存器当中的其他bit的默认值会不会对影响我对其他引脚的适用

不会的,这不会影响其他引脚的

,

HL P:

感谢您的回答, 完美的解决了我的疑问,我会再后续的开发中进行验证。

,

Susan Yang:

很高兴能帮到您,后续有其他问题,您可以随时发新帖讨论

赞(0)
未经允许不得转载:TI中文支持网 » TMS570LC4357: Configure part of N2HET pin as GIO pin
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1