一.问题描述
1.1平台描述
使用TMS320F280049芯片
编译器平台ccs8.3.0
编译器版本:TI v18.1.4.LTS
1.2 Cla内核CMD内存分配
Cla核数据空间:
RAMLS0_1 : origin = 0x008000, length = 0x001000
RAMLS2_3 : origin = 0x009000, length = 0x001000
Cla核程序空间:
RAMLS4_5_6_7 : origin = 0x00A000, length = 0x002000
程序空间寄存器配置:
MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS6 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS6 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS7 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS7 = 1;
数据空间寄存器配置:
MemCfgRegs.LSxMSEL.bit.MSEL_LS0 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS1 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS1 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS2 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS2 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS3 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS3 = 0;
1.3问题描述
在Cla内核中定义结构体变量
Struct_SourceVector strBypVoltageVector;
在.c文件中给这个结构体变量的元素赋值:
strBypVoltageVector.phaseA = 1;
strBypVoltageVector.alpha = 2;
strBypVoltageVector.alphaPos = 3;//strBypVoltageVector.phaseA;
strBypVoltageVector.beta = 4;
strBypVoltageVector.betaPos = 5;//strFifoOutputVoltAlpha.beforeOneFourthData;
程序烧录并调试(通过SCI串口方式把DSP数据用电脑显示,用这种方式查看变量目前为止并未出现过错误,故可以排除通讯与显示造成的问题)
但是发现变量strBypVoltageVector.alphaPos 和 strBypVoltageVector.betaPos的值并不等于3和5,而是等于0,通过Map文件往结构体strBypVoltageVector变量地址附近查找,发现strBypVoltageVector结构体变量地址000081b4上面的地址 fGridVoltAxisQFliterInteg1 00008186与fGridVoltAxisDFliterInteg1 00008188变量改变并等于3和5(这两个变量程序中从来没有用到),
具体结构体定义与相关变量地址如下:
//电压数据结构体
typedef struct
{
float phaseA;
float phaseB;
float phaseC;
float alpha;
float beta;
float axisDpos;
float axisQpos;
float axisDneg;
float axisQneg;
float alphaPos;
float betaPos;
float alphaNeg;
float betaNeg;
float vectValuePos;
float vectSinPos;
float vectCosPos;
float prevectSinPos;
float prevectCosPos;
float axisD;
float axisQ;
float axisDFliter;
float axisQFliter;
}Struct_SourceVector; //电网数据结构
//相关数据地址
00008180 206 (00008180) _fOutCurAxisDFliterInteg
00008182 206 (00008180) _fGridVoltAxisQFliterInteg
00008184 206 (00008180) _fGridVoltAxisDFliterInteg
00008186 206 (00008180) _fGridVoltAxisQFliterInteg1
00008188 206 (00008180) _fGridVoltAxisDFliterInteg1
0000818a 206 (00008180) _fOutRealPowerP
0000818c 206 (00008180) _fSelfAgeCurrSet
0000818e 206 (00008180) _fSelfAgeCurrAxisQSet
00008190 206 (00008180) _fSelfAgeCurrAxisDRef
00008192 206 (00008180) _fSelfAgeCurrAxisQRef
00008194 206 (00008180) _fSelfAgeLoopAxisDKpout
00008196 206 (00008180) _fSelfAgeLoopAxisDIng
00008198 206 (00008180) _fSelfAgeLoopAxisDOut
0000819a 206 (00008180) _fSelfAgeLoopAxisQKpout
0000819c 206 (00008180) _fSelfAgeLoopAxisQIng
0000819e 206 (00008180) _fSelfAgeLoopAxisQOut
000081a0 206 (00008180) _fSelfAgeLoopOutAxisD
000081a2 206 (00008180) _fSelfAgeLoopOutAxisQ
000081a4 206 (00008180) _fSelfAgeLoopOutAlpha
000081a6 206 (00008180) _fSelfAgeLoopOutBeta
000081a8 206 (00008180) _uiSelfAgingSoftCnt
000081aa 206 (00008180) _fSciVoltLoopKp
000081ac 206 (00008180) _fSciVoltLoopKi
000081ae 206 (00008180) _fSciCurrLoopKp
000081b0 206 (00008180) _fSciCurrLoopKi
000081b2 206 (00008180) _fSciFeedBackParam
000081b4 206 (00008180) _strBypVoltageVector
000081e0 207 (000081c0) _strGridVoltageVector
user4513027:
一.问题描述
1.1平台描述
使用TMS320F280049芯片
编译器平台ccs8.3.0
编译器版本:TI v18.1.4.LTS
1.2 Cla内核CMD内存分配
Cla核数据空间:
RAMLS0_1 : origin = 0x008000, length = 0x001000
RAMLS2_3 : origin = 0x009000, length = 0x001000
Cla核程序空间:
RAMLS4_5_6_7 : origin = 0x00A000, length = 0x002000
程序空间寄存器配置:
MemCfgRegs.LSxMSEL.bit.MSEL_LS4 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS4 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS5 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS5 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS6 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS6 = 1;
MemCfgRegs.LSxMSEL.bit.MSEL_LS7 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS7 = 1;
数据空间寄存器配置:
MemCfgRegs.LSxMSEL.bit.MSEL_LS0 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS0 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS1 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS1 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS2 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS2 = 0;
MemCfgRegs.LSxMSEL.bit.MSEL_LS3 = 1;
MemCfgRegs.LSxCLAPGM.bit.CLAPGM_LS3 = 0;
1.3问题描述
在Cla内核中定义结构体变量
Struct_SourceVector strBypVoltageVector;
在.c文件中给这个结构体变量的元素赋值:
strBypVoltageVector.phaseA = 1;
strBypVoltageVector.alpha = 2;
strBypVoltageVector.alphaPos = 3;//strBypVoltageVector.phaseA;
strBypVoltageVector.beta = 4;
strBypVoltageVector.betaPos = 5;//strFifoOutputVoltAlpha.beforeOneFourthData;
程序烧录并调试(通过SCI串口方式把DSP数据用电脑显示,用这种方式查看变量目前为止并未出现过错误,故可以排除通讯与显示造成的问题)
但是发现变量strBypVoltageVector.alphaPos 和 strBypVoltageVector.betaPos的值并不等于3和5,而是等于0,通过Map文件往结构体strBypVoltageVector变量地址附近查找,发现strBypVoltageVector结构体变量地址000081b4上面的地址 fGridVoltAxisQFliterInteg1 00008186与fGridVoltAxisDFliterInteg1 00008188变量改变并等于3和5(这两个变量程序中从来没有用到),
具体结构体定义与相关变量地址如下:
//电压数据结构体
typedef struct
{
float phaseA;
float phaseB;
float phaseC;
float alpha;
float beta;
float axisDpos;
float axisQpos;
float axisDneg;
float axisQneg;
float alphaPos;
float betaPos;
float alphaNeg;
float betaNeg;
float vectValuePos;
float vectSinPos;
float vectCosPos;
float prevectSinPos;
float prevectCosPos;
float axisD;
float axisQ;
float axisDFliter;
float axisQFliter;
}Struct_SourceVector; //电网数据结构
//相关数据地址
00008180 206 (00008180) _fOutCurAxisDFliterInteg
00008182 206 (00008180) _fGridVoltAxisQFliterInteg
00008184 206 (00008180) _fGridVoltAxisDFliterInteg
00008186 206 (00008180) _fGridVoltAxisQFliterInteg1
00008188 206 (00008180) _fGridVoltAxisDFliterInteg1
0000818a 206 (00008180) _fOutRealPowerP
0000818c 206 (00008180) _fSelfAgeCurrSet
0000818e 206 (00008180) _fSelfAgeCurrAxisQSet
00008190 206 (00008180) _fSelfAgeCurrAxisDRef
00008192 206 (00008180) _fSelfAgeCurrAxisQRef
00008194 206 (00008180) _fSelfAgeLoopAxisDKpout
00008196 206 (00008180) _fSelfAgeLoopAxisDIng
00008198 206 (00008180) _fSelfAgeLoopAxisDOut
0000819a 206 (00008180) _fSelfAgeLoopAxisQKpout
0000819c 206 (00008180) _fSelfAgeLoopAxisQIng
0000819e 206 (00008180) _fSelfAgeLoopAxisQOut
000081a0 206 (00008180) _fSelfAgeLoopOutAxisD
000081a2 206 (00008180) _fSelfAgeLoopOutAxisQ
000081a4 206 (00008180) _fSelfAgeLoopOutAlpha
000081a6 206 (00008180) _fSelfAgeLoopOutBeta
000081a8 206 (00008180) _uiSelfAgingSoftCnt
000081aa 206 (00008180) _fSciVoltLoopKp
000081ac 206 (00008180) _fSciVoltLoopKi
000081ae 206 (00008180) _fSciCurrLoopKp
000081b0 206 (00008180) _fSciCurrLoopKi
000081b2 206 (00008180) _fSciFeedBackParam
000081b4 206 (00008180) _strBypVoltageVector
000081e0 207 (000081c0) _strGridVoltageVector
相关推荐
- TIDM-DC-DC-BUCK: Design files can't download
- TMS320F28335: Error enabling this function: This task cannot be accomplished with the existing AET resources.
- TMS320F280049: 芯片在运行过程中莫名出现复位
- TMS320F28035: Ti28035芯片看门狗复位偶尔失败问题
- TMS320C28346: 28346 DMA和CPU同时访问冲突问题
- TMS320F28335: 是否有对应的SDL 软件诊断库?
- LAUNCHXL-F28069M: J3,5V引脚的作用是什么;在ADC采样过程中,需要怎样接外接信号?
- TMS320F28335: C2000™︎ 微控制器论坛