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.

[参考译文] LP-MSPM0G3507:将计时器加载值写入16位还是32位?

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1462313/lp-mspm0g3507-write-timer-load-value-as-16-or-32-bit

器件型号:LP-MSPM0G3507

工具与软件:

在参考手册中、我可以看到加载寄存器通常是32位、其中一半是保留的。

我正在设置 DMA 传输、它将在数组中迭代、将值写入计时器的加载寄存器。

因此、我想知道简单地使用 uint32_t 是否有什么不好的地方、或者使用 uint16_t 来目标16 LSB 是否会更加安全、而不使用保留位?

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

    尊敬的 Anders:

    我建议您使用其中一个16位计时器将 DMA 设置为执行16位传输(半字)、这样只会加载相应的16位。 如果您使用32位计时器、则可使用全部32位。

    此致、
    Luke