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.

How can i access to adc data register information?

Other Parts Discussed in Thread: ENERGIA, TM4C1294NCPDT

Hi everyone,

i'm programming in Energia environment. Im using the ADC to acquire  a signal and then calculate its frequency. The problem i have is i want to access to de adc data register to manage the information and do the calculations but im not sure what is the name of the register. Maybe ADC0_SSFIFO1?

Have i to declarte it or define it?

I am new in this of microcontroller, sorry

The part of problematic code is:

if (abs(2047-ADC0_SSFIFO1)>maxAmp)
{
maxAmp = abs(2047-ADC0_SSFIFO1);
}

and the compiling error is 

error: 'ADC0_SSFIFO1' was not declared in this scope

Thanks

  • Hello Alvaro,

    From where did you get the reference for ADC0_SSFIFO1?

    Regards
    Amit
  • I found it in Tiva™ TM4C1294NCPDT Microcontroller datasheet, pg.1074 and 1118

  • Hello Alvaro,

    But where is the define in your software database which gives the full address of the register?

    Regards
    Amit
  • For some reason there are duplicate threads on this topic. To save on effort, one should be closed and responses posted exclusively to one location. The other thread is located here: e2e.ti.com/.../1821294

    My latest post on that thread is:

    "Alvaro,

    Energia should have a function that reads this register if you are wanting to read it during run time. Otherwise, it should be accessible within the debugger to view during debug. I am not sure how Energia does this, but most IDEs will allow you to display the content of any of the memory mapped registers.

    Alternatively, you could simply read the content using the address of the register as pointer. i.e., tempvar = *(unsigned long*)(reg address);

    Note this methodology is generally frowned upon since there are usually functions written that do the same thing and abstract the specific HW out of the equation which is safer and more portable."