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 interrupt problem on TM4C123GH6PM

Other Parts Discussed in Thread: SYSBIOS

Hi,

I am using the TI-RTOS kernel i.e SYSBIOS to implement a project. My project include using Hwi's for a few peripherals such as GPIO , UART and also the ADC module.

I have been able to succesfully implement the Hwi's for the GPIO and the UART and have also verified that they occur and enter their respective ISR's. But when I create a Hwi for any sequencer of either of the 2 ADC's the interrupt never occurs and it does not enter the ISR's. I went through the user guide on creating Hwi's and even tried creating it as described but the problem still remains.

When I went through the examples for ADC use without RTOS I found that rather than using interrupts the ADC Interrupt register is polled to check the completion of conversion. I even tried to implement this using a Clock function which uses the following condition to check the interrupt.

while(!ADCIntStatus(ADC0_BASE,1,false))

{

}

But when I execute this code CCS throws up this error (as in screenshot)

CCS - v5.5

SYS/BIOS - 6.35.4.50

XDCtools - 3.25.4.88

I am using the TivaWare 2.1.0.12573 to use the Tiva C API's.

I have attached my CCS project file.

I kindly request for some help in resolving the problem fast.

Thanks,

Akhilesh

0602.project_new.zip

  • Akhilesh,

    I believe you have configured the ADC Hwis correctly.

    Because the polling function isn't successful, I strongly suspect that the ADC hasn't been initialized correctly.

    Not knowing anything about the Tiva ADC peripheral, I don't know what it takes to make it operate.

    Perhaps a clock source is missing?

    Alan

  • Hi Alan,

    I have verified the prescence of a clock source for the ADC by viewing the concerned registers in the CCS Debug window. Even i suspected that my ADC initialization might be faulty. Hence I used the same initialization sequence used in TI's examples for the Tiva ADC, which are known to be fault free. Also I doubt that the initialization changes for ADC in SYS/BIOS as compared to that in a non RTOS environment. All the help and suggestions are appreciated.

    Thanks

    Akhilesh

  • Akhilesh Raju said:
    When I went through the examples for ADC use without RTOS I found that rather than using interrupts the ADC Interrupt register is polled to check the completion of conversion.

    Those are example code snippets. You have to implement your own, that are interrupt based. Try to do an interrupt based ADC program without the use of TI-RTOS.

    Your compile error "Can't find a source file at  . . . . ", means your have a problem with your project settings locating that file at that location or you don't have that file at that location.

    -kel