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.

[参考译文] RTOS/MSP430FR5994:将字符串写入 MSP430FR5994时、Fatfs 显示错误

Guru**** 2577385 points
Other Parts Discussed in Thread: MSP430FR5994, MSP-EXP430FR5994

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/650885/rtos-msp430fr5994-write-string-to-msp430fr5994-with-fatfs-shows-wrong

器件型号:MSP430FR5994
主题中讨论的其他器件: MSP-EXP430FR5994

工具/软件:TI-RTOS

大家好、

   下面是客户提出的问题:

   客户已在 MSP430FR5994中添加了 Fatfs 文件系统、当他想用二进制格式将字符串"ADC12MEM0"写入文件时、会显示错误的代码。

这是他的代码:"F_write(&fil,ADC12MEM0.16,&bw);"。 是否有任何方法可以解决此问题? 非常感谢。

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

    f_write 函数需要字符串输入、而 ADC12MEM0寄存器是整数值。 必须进行转换才能以预期格式获取数据、在线提供了几个示例。 您还可以参考为 MSP-EXP430FR5994设计的 OutOfBox_MSP430FR5994代码中的 SDCardLogMode.c 文件、了解如何使用 itoa 和 f_Ps 函数来相应地转换和存储值。

    此致、
    Ryan