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.

ADC initialization is causing error "xdc.runtime.Error.raise: terminating execution"

Other Parts Discussed in Thread: TMS320F28335

Hi all,

I'm using TMS320F28335 controlCARD with Peripheral Explorer for a SYS/BIOS application, I was using ePWM modules with no problems at all. Now that I'm trying to use the ADC module alongside  ePWM the execution is terminated.

The error is : gged interrupt flagged: intr# 19
xdc.runtime.Error.raise: terminating execution

If I comment the ADC initialization line, the error seems to go away.. I've found similar issues in other posts, nevertheless the presented solutions didn't fixed my problem. Mainly I followed the suggestions to rearrange the memory allocation, but the problem persists.

The ADC initialization code is as follows:

void adc_init(){

//--- Power-up the ADC
AdcRegs.ADCTRL3.all = 0x00EC; // Power-up reference and main ADC

DELAY_US(5000); // Wait 5 ms before using the ADC

//--- Configure the other ADC registers
AdcRegs.ADCREFSEL.bit.REF_SEL = 0; // ADC reference, 0=internal, 1=external

AdcRegs.ADCMAXCONV.all = 0x0000;

AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0; // Convert Channel 0

AdcRegs.ADCTRL1.all = 0x0010;

AdcRegs.ADCTRL2.all = 0x0900;

//--- Enable the ADC interrupt
PieCtrlRegs.PIEIER1.bit.INTx6 = 1; // Enable ADCINT in PIE group 1
IER |= 0x0001; // Enable INT1 in IER to enable PIE group

}// end of adc_init()

Any idea of what might be the problem?

Thanks in advance,

Mário

  • Hi Mario,

    What example are you using, and what version of SYS/BIOS? Is this SYS/BIOS example from Control Suite?

    I'm looking at the PIE regs in you code snippet. Use SYS/BIOS Hwi APIs to manipulate interrupts instead of accessing them directly. See the Hwi API docs in your SYS/BIOS installation.

  • Hi Kopriva,

    thank you for replying to my question.

    I'm working with CCS v5.4 under Debian Wheezy, my SYS/BIOS version is the 6.35.1.29 and the XDCtools version is 3.25.0.48.

    To create new project I normally go to File->New->CCS Project 

    then I choose the device and I choose an example from SYS/BIOS -> C28x examples. I normally use the "Task" example.

    While trying to solve this issue I came to know that the function InitFlash() also brings me to the same error condition as the adc_init() does.

    I also found this post "http://e2e.ti.com/support/embedded/tirtos/f/355/p/300340/1052029.aspx" stating that Flash should be initialized from RAM. Might this be the solution?

    I will have a look at the documents you told me.

    Best regards,

    Mário