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.

TMS320F28069M: Motorware: ADC_getIntFlag() issue

Part Number: TMS320F28069M
Other Parts Discussed in Thread: MOTORWARE

Hi,

the following code in Motorware may have an ordering issue

static inline bool ADC_getIntFlag(ADC_Handle adcHandle,const ADC_IntNumber_e intNumber)

{

  ADC_Obj *adc = (ADC_Obj *)adcHandle;

  bool status;

  // check the status of the bit

  status = (bool)( adc->ADCINTFLG & (1 << intNumber) >> intNumber );   //GHS--- questionable, seems to only work for ADCINT1

  return(status);

} // end of ADC_getIntFlag() function

This does not work for intNumber=1, it works for intNumber=0.

Changing to this works for both ADCINT1 (intNumber=0) and ADCINT2 (intNumber=1)

  status = (bool)( (adc->ADCINTFLG & (1 << intNumber)) >> intNumber );  

Regards,

--Gunter