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.

[参考译文] TMS320F28027F:如何在 C2000中使用 float16_t

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1057386/tms320f28027f-how-to-use-float16_t-in-c2000

器件型号:TMS320F28027F
主题中讨论的其他器件:MOTORWARE

大家好!

美好的一天!

我正在使用 Lab03.c (InstaSPIN)。

Q1:我尝试使用 float16_t (16位浮点)。如 C:\ti\motorware\motorware_1_01_00_18\docs\motorware_coding_standards.pdf 中所述   

第7页。

但编译器出错!

Q2:"uint16_t 和"unsigned int" 或  "unsigned char"和"uint8_t"之间有何区别?

请告诉我如何使用16位浮点吗?

提前感谢。

Dave。

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

    您好、Dave、

    uint16_t 和 unsigned int 是相同的、uint8_t 和 unsigned char 是相同的。 (请参阅 stdint.h)

    确切的编译器错误是什么?

    -Shantanu

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

     对于编译器、float16_t 未知。
    它应突出显示为类型、如 int、float 等。
    但它没有。

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

    我们仅支持单精度(32位)和双精度(64位)浮点。