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.

While (ADC10TL1 & ADC10BUSY)

Other Parts Discussed in Thread: MSP430G2231

When i am using While(ADC10TL1 & ADC10BUSY) i am getting an error in ma (embedded c)code.

(Micro-controller which i am using is MSP430G2231(LAUNCHPAD) and Code Composer Studio V5.)

The error reads as

Multiple markers at this line
- #20 identifier "AD10BUSY" is undefined
- <a href="file:/D:/code%20composer%20studiov5/ccsv5/tools/compiler/dmed/HTML/MSP430/1527.html">#1527-D</a> (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module
instead
- #20 identifier "ADC10TL1" is undefined

What steps i should take to solve this error.

Thanks in anticipation.

  • Spelling errors.

    - #20 identifier "AD10BUSY" is undefined

    - #20 identifier "ADC10TL1" is undefined

  • Nikita Hosur said:
    What steps i should take to solve this error.

    Besides teh two rather obvious spelling errors (ADC10BUSY and ADC10CTL1), the ULP advisor has told you that you are using an empty loop as delay. Which is fragile at best. The compiler may optimize such an empty delay loop away without warning, making you delay void. An empty loop has no efffect on the system state, and the C compiler doesn't care for your intention to just waste time.

    Use the __delay_cycles() intrinsic instead for wastign a specific (and constant) number of MCLK cycles, or use a timer for the delay.

**Attention** This is a public forum