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

请问TMS28035 ADC例程下载到FLASH出错

28035的ADC_SOC例程,在DEBUG调试下正常,可下载到FLASH后,点进行就会进到非法中断里面去

interrupt void ILLEGAL_ISR(VOID)
{
insert isr code here
next two lines for debug only to halt  the processor here
remove after inserting isr code

asm("   ESTOPO);

for(;;);

}

请问一下如何解决这个问题

NO NO1:

TI工程师们,怎么没人理我 !是我说得不清楚?自己顶一下

28035的ADC_SOC例程,在DEBUG调试下正常,可下载到FLASH后,点进行就会进到非法中断里面去

interrupt void ILLEGAL_ISR(VOID)
{
insert isr code here
next two lines for debug only to halt  the processor here
remove after inserting isr code

asm("   ESTOPO);

for(;;);

}

请问一下如何解决这个问题

NO NO1:

回复 NO NO1:

自己再顶一下

28035的ADC_SOC例程,在DEBUG调试下正常,可下载到FLASH后,点进行就会进到非法中断里面去

interrupt void ILLEGAL_ISR(VOID)
{
insert isr code here
next two lines for debug only to halt  the processor here
remove after inserting isr code

asm("   ESTOPO);

for(;;);

}

请问一下如何解决这个问题

Blake Ma:

回复 NO NO1:

您好,

请问有没有检查过所使用的 CMD 文件是否有问题?

28035的ADC_SOC例程,在DEBUG调试下正常,可下载到FLASH后,点进行就会进到非法中断里面去

interrupt void ILLEGAL_ISR(VOID)
{
insert isr code here
next two lines for debug only to halt  the processor here
remove after inserting isr code

asm("   ESTOPO);

for(;;);

}

请问一下如何解决这个问题

NO NO1:

回复 Blake Ma:

cmd文件是官方的,我没有改过,程序单步运行到下面的这句后就进非法中断了 DELAY_US(ADC_usDELAY);         // Delay before converting ADC channels }

 

 

void InitAdc(void) {     extern void DSP28x_usDelay(Uint32 Count);

    // *IMPORTANT*     // The Device_cal function, which copies the ADC calibration values from TI reserved     // OTP into the ADCREFSEL and ADCOFFTRIM registers, occurs automatically in the     // Boot ROM. If the boot ROM code is bypassed during the debug process, the     // following function MUST be called for the ADC to function according     // to specification. The clocks to the ADC MUST be enabled before calling this     // function.     // See the device data manual and/or the ADC Reference     // Manual for more information.

        EALLOW;         SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;         (*Device_cal)();         EDIS;

    // To powerup the ADC the ADCENCLK bit should be set first to enable     // clocks, followed by powering up the bandgap, reference circuitry, and ADC core.     // Before the first conversion is performed a 5ms delay must be observed     // after power up to give all analog circuits time to power up and settle

    // Please note that for the delay function below to operate correctly the     // CPU_RATE define statement in the DSP2803x_Examples.h file must     // contain the correct CPU clock period in nanoseconds.     EALLOW;     AdcRegs.ADCCTL1.bit.ADCBGPWD  = 1;      // Power ADC BG     AdcRegs.ADCCTL1.bit.ADCREFPWD = 1;      // Power reference     AdcRegs.ADCCTL1.bit.ADCPWDN   = 1;      // Power ADC     AdcRegs.ADCCTL1.bit.ADCENABLE = 1;      // Enable ADC     AdcRegs.ADCCTL1.bit.ADCREFSEL = 0;      // Select interal BG     EDIS;

    DELAY_US(ADC_usDELAY);         // Delay before converting ADC channels }

赞(0)
未经允许不得转载:TI中文支持网 » 请问TMS28035 ADC例程下载到FLASH出错
分享到: 更多 (0)