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.

在使用F2812时发现了一些问题,求解答

刚开始接触DSP,有很多东西不是很懂,希望大家见谅。

在使用函数strcpy时,发现不能进行字符串复制,如下述语句

1) strcpy((char*)g_SciTxBuf.Data, "_RDY");

这条语句执行之后"_RDY"并没有复制进g_SciTxBuf.Data中。

之后又尝试了很多其他形式,包括

2) strcpy((char*)g_SciTxBuf.Data, (char*)Data_set);

3) strcpy((char*)Data_set_1, (char*)Data_set);

4) strcpy((char*)Data_set_1, "_RDY");

发现2), 4) 依然无法复制,但是3)可以,记忆中被复制的字符串用"_RDY"的格式应该可以复制,

而且2) 无法复制不清楚是不是由于g_SciTxBuf.Data是结构体中字符数组的缘故,此后尝试用

memcpy替换strcpy函数,发现上述4种情况全部可以正常运作,不是很清楚原因,希望可以得到

诸位的帮助,谢谢!

同时,strlen,atoi,atof这些库函数都无法正常使用,目前的解决方法是自己参考库函数重新编

写了备用函数并调用,但在同一源文件中的strcmp却可以正常使用。

另外,环境是转移到CCS6.1上的,先前在大概4或5的CCS上搭建,然后Flash状态寄存器在设置

时会跑飞掉,包括以下语句:

FlashRegs.FSTATUS.bit.V3STAT = 1; // Clear the 3VSTAT bit
FlashRegs.FSTDBYWAIT.bit.STDBYWAIT = 0x01FF; // Sleep to standby transition cycles
FlashRegs.FACTIVEWAIT.bit.ACTIVEWAIT = 0x01FF; // Standby to active transition cycles
FlashRegs.FBANKWAIT.bit.RANDWAIT = 5; // Random access waitstates
FlashRegs.FBANKWAIT.bit.PAGEWAIT = 5; // Paged access waitstates
FlashRegs.FOTPWAIT.bit.OTPWAIT = 8; // OTP waitstates
FlashRegs.FOPT.bit.ENPIPE = 1; // Enable the flash pipeline

不清楚上述问题是否与Flash状态无法设置有关,还希望有大神可以帮忙解答,谢谢!