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.

[参考译文] TMS320F280045:ADC SOC CTL 寄存器的位字段大小

Guru**** 2513185 points
Other Parts Discussed in Thread: C2000WARE

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1159353/tms320f280045-size-of-bitfields-for-adc-soc-ctl-register

器件型号:TMS320F280045
主题中讨论的其他器件:C2000WARE

在 C2000Ware 版本4 f28004x_adc.h 中、我可以看到 ADCSOC0CTL_BITS 结构的 CHSEL 部分(以及所有其他 SOC 寄存器的 CHSEL 部分)被定义为 UINT32、而其他元素为 UINT16。

 为什么这个被定义为 UINT32有任何特殊原因吗? 将其更改为 uint16似乎是安全的、因为 IT shoudl 只有4位长。

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

    您好 Jose、

    我不知道为什么会这样、我认为可以将其更改为 uint16是对的。 无论哪种方式、它都是无害的、因为位字段大小直接映射到32位寄存器中的字段。 我可以为我们的软件团队提交错误、但这是一个低优先级项目。

    此致、
    Ibukun