This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TMS320F28379D: ILLEGAL_ISR() at F2837xD Default_ISR.c:164 0x08204 while running a DAC Code.

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

Hello, I am fairly new to TMS320F28379D. I am facing a problem while running a DAC code in CCS. When I run the code the (main.c) the program goes into the line 164 of F28379D_DefaultISR.c (asm("    ESTOP0").

Below is my code

#include "F28x_Project.h"
#include "math.h"
// Function Declaration

void InitDacaV1 ( void ); // DAC A Configure
__interrupt void cpu_timer0_isr(void);

// Global Variable

Uint16 DAC_input = 100;

// Main Function

void main ( void )
{
InitSysCtrl(); // Basic Core Init from DSP2833x_SysCtrl.c

DINT; // Disable all interrupts
InitPieCtrl();//Initialize the PIE control registers, (all flags are cleared) in F2837xD_PieCtrl.c file.
IER = 0x0000;//Interrupt enable registers are cleared
IFR = 0x0000;//Interrupt flag registers are cleared
InitPieVectTable();// default ISR's in PIE(initialisation for loading vector address of interrupts)

EALLOW;
PieVectTable.TIMER0_INT = &cpu_timer0_isr;
EDIS;

InitCpuTimers(); // For this example, only initialize the Cpu1 Timers
ConfigCpuTimer(&CpuTimer0, 200, 2000000); // CPU1 - Timer0 at 1000 milliseconds
CpuTimer0Regs.TCR.all = 0x4000; // start timer0
IER |= M_INT1; // Enable CPU INT1 which is connected to CPU-Timer 0:
PieCtrlRegs.PIEIER1.bit.INTx7 = 1; //Timer 0 interrupt
EINT; // Enable Global __interrupt INTM
ERTM; // Enable Global real time __interrupt DBGM
InitDacaV1 (); // Configure DAC A

while(1)
{
while(CpuTimer0.InterruptCount == 0); // wait for 1000ms
CpuTimer0.InterruptCount = 0;
}
}

void InitDacaV1 ( void )
{
EALLOW ;
//--- Configure DAC -A control registers
DacaRegs . DACCTL .bit. DACREFSEL = 1;
//DacaRegs . DACCTL .bit. LOADMODE = 0;
//--- Enable DAC -A output
DacaRegs . DACOUTEN . bit . DACOUTEN = 1;
//DacaRegs . DACVALS .bit . DACVALS = DAC_input ;
DacaRegs.DACVALS.all = 0;

DELAY_US (500);// Delay for buffered DAC to power up
EDIS ;
}

__interrupt void cpu_timer0_isr(void)
{
if(DAC_input > 3600)
{
DAC_input = 100;
}
else
{
DAC_input = DAC_input+500;
}
EALLOW;
DacaRegs.DACVALS.all = DAC_input ;
EDIS;
CpuTimer0.InterruptCount++;
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;// //Acknowledge interrupt
}

This is a fairly simple code which will update the DACVALS register every 2 seconds. Initial Value at DACVALS is 100 and then every 2 seconds 500 is added to the previous value which was in DACVALS. I have attached the picture of the files included in my project and also the error (not exactly error) but some program is breaking and coming to Default ISR as shown in the picture.This problem occurs only when I am running a DAC code and any other code will work fine.

However in the Program, if I comment out the DELAY_US(500) (Comment out in the sense, if I delete that particular line). , Then the program runs fine , and i don't see any break in the program.

It is very simple code to update the DACVALS every 2 seconds.