-
DSP28335编程问题:正弦波查找表中相位值不更新 sos
* * main.c * * Created on: 2023年10月30日 * Author: DELL */ #include "DSP2833x_Device.h" // DSP2833x Headerfile Include File #include "DSP2833x_Examples.h" // DSP2833x Examples Include File #define TABLE_SIZE 128 // 查找表的大小 #define TABLE_SCALE 32767 // 查找表的缩放因子 typedef unsigned long ulong; float b; float c; float phase=20; float sin=0; int sin_table[TABLE_SIZE] = { 0, 1608, 3212, 4808, 6393, 7962, 9512, 11039, 12539, 14010, 15446, 16846, 18204, 19519, 20787, 22005, 23170, 24279, 25329, 26319, 27245, 28105, 28898, 29621, 30273, 30852, 31356, 31785, 32137, 32412, 32609, 32728, 32767, 32728, 32609, 32412, 32137, 31785, 31356, 30852, 30273, 29621, 28898, 28105, 27245, 26319, 25329, 24279, 23170, 22005, 20787, 19519, 18204, 16846, 15446, 14010, 12539, 11039, 9512, 7962, 6393, 4808, 3212, 1608,0, -1608, -3212, -4808, -6393, -7962, -9512, -11039, -12539, -14010, -15446, -16846, -18204, -19519, -20787, -22005, -23170, -24279, -25329, -26319, -27245, -28105, -28898, -29621, -30273, -30852, -31356, -31785, -32137, -32412, -32609, -32728, -32767, -32728, -32609, -32412, -32137, -31785, -31356, -30852, -30273, -29621, -28898, -28105, -27245, -26319, -25329, -24279, -23170, -22005, -20787, -19519, -18204, -16846, -15446, -14010, -12539, -11039, -9512, -7962, -6393, -4808, -3212, -1608 }; void main() { while(1) {int a=phase; sin=sin_table[a] ; } } 各位,问大家个问题。我用ccs的watch expression功能在线修改phase得值时,sin值并不会随着改变。哪里有问题吗?
1387浏览量 0回复量 关注量 -
DSP28335 如何优化Ucosii系统 sos
DSP28335移植官方的《micrium_tmdsdock28335_os2》,移植成功运行后,发现当任务运行时会暂停中断服务,这个改如何优化?
1363浏览量 0回复量 关注量