Part Number: TMS320F28069
我目前使用TI 15.12.3.LTS 版本进行编译, 但遇到一个问题,觉得很危险,就是我使用Int16 定义了一个变量,比如Int16 current = 495;
然后定义float result = current * current,
495*495 = 245025, 也就是0x3 BD21,但由于current 只有16 bit,编译器默认 current * current 的结果也只是使用16 bit 进行存储,于是变成 0xBD2…
Other Parts Discussed in Thread: TIDM-02010 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。 https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1196278/tms320f28069-double-layer-pcb…