TI中文支持网
TI专业的中文技术问题搜集分享网站

F2812例程AD初始化执行到延时函数会跳转到ILLEGAL_ISR

把TI网站下的例程中第一个例程“ adc_seq_ovd_test ”编译下载到F2812芯片上,在线仿真程序跑到  

void InitAdc(void)
{
//extern void DSP28x_usDelay(Uint32 Count);
// To powerup the ADC the ADCENCLK bit should be set first to enable
// clocks, followed by powering up the bandgap and reference circuitry.
// After a 5ms delay the rest of the ADC can be powered up. After ADC
// powerup, another 20us delay is required before performing the first
// ADC conversion. Please note that for the delay function below to
// operate correctly the CPU_CLOCK_SPEED define statement in the
// DSP28_Examples.h file must contain the correct CPU clock period in
// nanoseconds. For example:

AdcRegs.ADCTRL3.bit.ADCBGRFDN = 0x3; // Power up bandgap/reference circuitry
DELAY_US(ADC_usDELAY); // Delay before powering up rest of ADC
AdcRegs.ADCTRL3.bit.ADCPWDN = 1; // Power up rest of ADC
DELAY_US(ADC_usDELAY2); // Delay after powering up ADC
}

这个初始化函数的 DELAY_US 延时会跳转到 ILLEGAL_ISR      请教一下有没有人遇到过这种问题,有没有好的解决方法。

syemour syemour:

回复 Hank Zhao:

具体如何操作?

把TI网站下的例程中第一个例程“ adc_seq_ovd_test ”编译下载到F2812芯片上,在线仿真程序跑到  

void InitAdc(void)
{
//extern void DSP28x_usDelay(Uint32 Count);
// To powerup the ADC the ADCENCLK bit should be set first to enable
// clocks, followed by powering up the bandgap and reference circuitry.
// After a 5ms delay the rest of the ADC can be powered up. After ADC
// powerup, another 20us delay is required before performing the first
// ADC conversion. Please note that for the delay function below to
// operate correctly the CPU_CLOCK_SPEED define statement in the
// DSP28_Examples.h file must contain the correct CPU clock period in
// nanoseconds. For example:

AdcRegs.ADCTRL3.bit.ADCBGRFDN = 0x3; // Power up bandgap/reference circuitry
DELAY_US(ADC_usDELAY); // Delay before powering up rest of ADC
AdcRegs.ADCTRL3.bit.ADCPWDN = 1; // Power up rest of ADC
DELAY_US(ADC_usDELAY2); // Delay after powering up ADC
}

这个初始化函数的 DELAY_US 延时会跳转到 ILLEGAL_ISR      请教一下有没有人遇到过这种问题,有没有好的解决方法。

CAI DANSE:

回复 Hank Zhao:

如果在RAM里运行呢,( ramfuncs         : > RAMM0          PAGE = 0)本身已拷贝到RAM里了,还是会跳转到ILLEGAL_ISR,是会原因?

 

赞(0)
未经允许不得转载:TI中文支持网 » F2812例程AD初始化执行到延时函数会跳转到ILLEGAL_ISR
分享到: 更多 (0)