我放置了mian还是有错误,请高人帮我解答这一问题!谢谢
#include "DSP280x_Device.h"
#include "mod6_cnt.h"
#include "impulse.h"
#include "f280xhall3.h"
#include "DSP280x_Examples.h"
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
#define ISR_FREQUENCY 40
#define SYSTEM_FREQUENCY 100
interrupt void MainISR(void);
HALL3 hall1 = HALL3_DEFAULTS;
Uint16 ClosedFlag = 0;
MOD6CNT mod1 = MOD6CNT_DEFAULTS;
IMPULSE impl1 = IMPULSE_DEFAULTS;
void mian(void)
{
InitSysCtrl();
DINT;
IER = 0x0000;
IFR = 0x0000;
InitPieCtrl();
InitPieVectTable();
InitCpuTimers();
ConfigCpuTimer(&CpuTimer0, 100, SYSTEM_FREQUENCY*10/ISR_FREQUENCY);
StartCpuTimer0();
EALLOW;
PieVectTable.TINT0 = &MainISR;
EDIS;
PieCtrlRegs.PIEIER1.all = M_INT7;
IER |= M_INT1;
hall1.DebounceAmount = 0;
hall1.Revolutions = -2;
hall1.init(&hall1);
while(1);
}
interrupt void MainISR(void)
{
hall1.HallMapPointer = (int16)mod1.Counter;
hall1.read(&hall1);
if (hall1.Revolutions>=0)
ClosedFlag=TRUE;
if (ClosedFlag==FALSE) {
mod1.TrigInput = impl1.Out;
mod1.Counter = (int32)hall1.HallMapPointer;
}
else
mod1.TrigInput = (int32)hall1.CmtnTrigHall;
mod1.calc(&mod1);
}
Martin Yu:
void mian(void) 应该是 main,注意拼写。
我放置了mian还是有错误,请高人帮我解答这一问题!谢谢
#include "DSP280x_Device.h"
#include "mod6_cnt.h"
#include "impulse.h"
#include "f280xhall3.h"
#include "DSP280x_Examples.h"
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
#define ISR_FREQUENCY 40
#define SYSTEM_FREQUENCY 100
interrupt void MainISR(void);
HALL3 hall1 = HALL3_DEFAULTS;
Uint16 ClosedFlag = 0;
MOD6CNT mod1 = MOD6CNT_DEFAULTS;
IMPULSE impl1 = IMPULSE_DEFAULTS;
void mian(void)
{
InitSysCtrl();
DINT;
IER = 0x0000;
IFR = 0x0000;
InitPieCtrl();
InitPieVectTable();
InitCpuTimers();
ConfigCpuTimer(&CpuTimer0, 100, SYSTEM_FREQUENCY*10/ISR_FREQUENCY);
StartCpuTimer0();
EALLOW;
PieVectTable.TINT0 = &MainISR;
EDIS;
PieCtrlRegs.PIEIER1.all = M_INT7;
IER |= M_INT1;
hall1.DebounceAmount = 0;
hall1.Revolutions = -2;
hall1.init(&hall1);
while(1);
}
interrupt void MainISR(void)
{
hall1.HallMapPointer = (int16)mod1.Counter;
hall1.read(&hall1);
if (hall1.Revolutions>=0)
ClosedFlag=TRUE;
if (ClosedFlag==FALSE) {
mod1.TrigInput = impl1.Out;
mod1.Counter = (int32)hall1.HallMapPointer;
}
else
mod1.TrigInput = (int32)hall1.CmtnTrigHall;
mod1.calc(&mod1);
}
kuugav LIANG:
回复 Martin Yu:
我修改了一下 ,问题还是有
#include "DSP280x_Device.h"#include "mod6_cnt.h"#include "impulse.h"#include "f280xhall3.h"#include "DSP280x_Examples.h"
#ifndef TRUE#define FALSE 0#define TRUE 1#endif#define ISR_FREQUENCY 40#define SYSTEM_FREQUENCY 100
interrupt void MainISR(void);
HALL3 hall1 = HALL3_DEFAULTS;
Uint16 ClosedFlag = 0;
MOD6CNT mod1 = MOD6CNT_DEFAULTS;
IMPULSE impl1 = IMPULSE_DEFAULTS;
void main(void){InitSysCtrl();
DINT;IER = 0x0000;IFR = 0x0000;
InitPieCtrl();InitPieVectTable();
InitCpuTimers();
ConfigCpuTimer(&CpuTimer0, 100, SYSTEM_FREQUENCY*10/ISR_FREQUENCY);StartCpuTimer0();
EALLOW;PieVectTable.TINT0 = &MainISR;EDIS;
PieCtrlRegs.PIEIER1.all = M_INT7;
IER |= M_INT1;
hall1.DebounceAmount = 0;hall1.Revolutions = -2;hall1.init(&hall1);
while(1);
}
interrupt void MainISR(void){hall1.HallMapPointer = (int16)mod1.Counter;hall1.read(&hall1);
if (hall1.Revolutions>=0)ClosedFlag=TRUE;
if (ClosedFlag==FALSE) {mod1.TrigInput = impl1.Out;mod1.Counter = (int32)hall1.HallMapPointer;}elsemod1.TrigInput = (int32)hall1.CmtnTrigHall;mod1.calc(&mod1);}
我放置了mian还是有错误,请高人帮我解答这一问题!谢谢
#include "DSP280x_Device.h"
#include "mod6_cnt.h"
#include "impulse.h"
#include "f280xhall3.h"
#include "DSP280x_Examples.h"
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
#define ISR_FREQUENCY 40
#define SYSTEM_FREQUENCY 100
interrupt void MainISR(void);
HALL3 hall1 = HALL3_DEFAULTS;
Uint16 ClosedFlag = 0;
MOD6CNT mod1 = MOD6CNT_DEFAULTS;
IMPULSE impl1 = IMPULSE_DEFAULTS;
void mian(void)
{
InitSysCtrl();
DINT;
IER = 0x0000;
IFR = 0x0000;
InitPieCtrl();
InitPieVectTable();
InitCpuTimers();
ConfigCpuTimer(&CpuTimer0, 100, SYSTEM_FREQUENCY*10/ISR_FREQUENCY);
StartCpuTimer0();
EALLOW;
PieVectTable.TINT0 = &MainISR;
EDIS;
PieCtrlRegs.PIEIER1.all = M_INT7;
IER |= M_INT1;
hall1.DebounceAmount = 0;
hall1.Revolutions = -2;
hall1.init(&hall1);
while(1);
}
interrupt void MainISR(void)
{
hall1.HallMapPointer = (int16)mod1.Counter;
hall1.read(&hall1);
if (hall1.Revolutions>=0)
ClosedFlag=TRUE;
if (ClosedFlag==FALSE) {
mod1.TrigInput = impl1.Out;
mod1.Counter = (int32)hall1.HallMapPointer;
}
else
mod1.TrigInput = (int32)hall1.CmtnTrigHall;
mod1.calc(&mod1);
}
xiaotao liu:
回复 kuugav LIANG:
请问这个问题您解决了吗?我也遇到了同样的问题。
我放置了mian还是有错误,请高人帮我解答这一问题!谢谢
#include "DSP280x_Device.h"
#include "mod6_cnt.h"
#include "impulse.h"
#include "f280xhall3.h"
#include "DSP280x_Examples.h"
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
#define ISR_FREQUENCY 40
#define SYSTEM_FREQUENCY 100
interrupt void MainISR(void);
HALL3 hall1 = HALL3_DEFAULTS;
Uint16 ClosedFlag = 0;
MOD6CNT mod1 = MOD6CNT_DEFAULTS;
IMPULSE impl1 = IMPULSE_DEFAULTS;
void mian(void)
{
InitSysCtrl();
DINT;
IER = 0x0000;
IFR = 0x0000;
InitPieCtrl();
InitPieVectTable();
InitCpuTimers();
ConfigCpuTimer(&CpuTimer0, 100, SYSTEM_FREQUENCY*10/ISR_FREQUENCY);
StartCpuTimer0();
EALLOW;
PieVectTable.TINT0 = &MainISR;
EDIS;
PieCtrlRegs.PIEIER1.all = M_INT7;
IER |= M_INT1;
hall1.DebounceAmount = 0;
hall1.Revolutions = -2;
hall1.init(&hall1);
while(1);
}
interrupt void MainISR(void)
{
hall1.HallMapPointer = (int16)mod1.Counter;
hall1.read(&hall1);
if (hall1.Revolutions>=0)
ClosedFlag=TRUE;
if (ClosedFlag==FALSE) {
mod1.TrigInput = impl1.Out;
mod1.Counter = (int32)hall1.HallMapPointer;
}
else
mod1.TrigInput = (int32)hall1.CmtnTrigHall;
mod1.calc(&mod1);
}
Joey Mao:
回复 xiaotao liu:
可能是工程中缺少或没有链接上了报错变量或函数的定义文件,需要添加文件或者进行文件搜索路径设置
我放置了mian还是有错误,请高人帮我解答这一问题!谢谢
#include "DSP280x_Device.h"
#include "mod6_cnt.h"
#include "impulse.h"
#include "f280xhall3.h"
#include "DSP280x_Examples.h"
#ifndef TRUE
#define FALSE 0
#define TRUE 1
#endif
#define ISR_FREQUENCY 40
#define SYSTEM_FREQUENCY 100
interrupt void MainISR(void);
HALL3 hall1 = HALL3_DEFAULTS;
Uint16 ClosedFlag = 0;
MOD6CNT mod1 = MOD6CNT_DEFAULTS;
IMPULSE impl1 = IMPULSE_DEFAULTS;
void mian(void)
{
InitSysCtrl();
DINT;
IER = 0x0000;
IFR = 0x0000;
InitPieCtrl();
InitPieVectTable();
InitCpuTimers();
ConfigCpuTimer(&CpuTimer0, 100, SYSTEM_FREQUENCY*10/ISR_FREQUENCY);
StartCpuTimer0();
EALLOW;
PieVectTable.TINT0 = &MainISR;
EDIS;
PieCtrlRegs.PIEIER1.all = M_INT7;
IER |= M_INT1;
hall1.DebounceAmount = 0;
hall1.Revolutions = -2;
hall1.init(&hall1);
while(1);
}
interrupt void MainISR(void)
{
hall1.HallMapPointer = (int16)mod1.Counter;
hall1.read(&hall1);
if (hall1.Revolutions>=0)
ClosedFlag=TRUE;
if (ClosedFlag==FALSE) {
mod1.TrigInput = impl1.Out;
mod1.Counter = (int32)hall1.HallMapPointer;
}
else
mod1.TrigInput = (int32)hall1.CmtnTrigHall;
mod1.calc(&mod1);
}
bighua lin:
回复 kuugav LIANG:
这个问题 我觉得是obj的路径设置有问题,能可以去debug/include里面把obj重新设置一下。