TMS320F280039C: The analog function of the pin is enabled or disabled

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

通过对寄存器的GPHAMSEL了解,对其bit写1或0可以使能或禁止引脚的analog function,结合例程C2000Ware_5_00_00_00/adc_ex1_soc_software观察变量myADC0Result0,即使将GPHAMSEL置为0,myADC0Result0输出也会随着输入引脚的电压而变化。

By understanding the GPHAMSEL register, writing a 1 or 0 to its bits can enable or disable the analog function of the pins. In conjunction with the example C2000Ware_5_00_00_00/adc_ex1_soc_software, observing the variable myADC0Result0 shows that even if GPHAMSEL is set to 0, myADC0Result0 will still change according to the voltage on the input pin.

使用开发板LaunchPads280039C,将GPHAMSEL置为0(analog function is disabled),A0引脚连接至V3.3,观察到myADC0Result0接近4096。

Using the development board LaunchPads280039C, set GPHAMSEL to 0 (analog function is disabled), connect the A0 pin to V3.3, and observe that myADC0Result0 is close to 4096.

image.png

当A0引脚连接至GND,观察到myADC0Result0接近0。

When the A0 pin is connected to GND, myADC0Result0 is observed to be close to 0.

image.png

为什么GPHAMSEL置为0时,所有的采样看似依然正常呢?

Why does everything seem to be sampled normally when GPHAMSEL is set to 0? 

期待您的答复。

I look forward to your reply.