TI论坛
直播中

莫钻红

8年用户 240经验值
私信 关注
[问答]

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      请教一下有没有人遇到过这种问题,有没有好的解决方法。

回帖(3)

李秋年

2020-7-25 11:29:52
执行这个函数前,先运行一下memcopy函数,将DELAY_US copy到RAM区域。
举报

王晶

2020-7-25 11:49:08
引用: szoldman 发表于 2020-7-25 15:34
执行这个函数前,先运行一下memcopy函数,将DELAY_US copy到RAM区域。

具体如何操作?
举报

马沃源

2020-7-25 12:02:07
引用: szoldman 发表于 2020-7-25 15:34
执行这个函数前,先运行一下memcopy函数,将DELAY_US copy到RAM区域。

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

更多回帖

发帖
×
20
完善资料,
赚取积分