cancel
Showing results for 
Search instead for 
Did you mean: 

SPC560D30L3 - ADC states

ssk
Associate II
Posted on March 18, 2015 at 15:55

Hello,

I am trying to use the ADC driver (ADCD2) for SPC560D30L3 device using Discovery kit (I have replaced SPC560D40 with SPC560D30 MCU). I am trying to implement a state machine using different states of ADC driver. If my understanding is correct, I shall access the states as below,

switch (ADCD2.state)

{

case ADC_UNINIT:

break;

case ADC_STOP:

break;

case ADC_READY:

break;

case ADC_ACTIVE:

break;

case ADC_COMPLETE:

break;

case ADC_ERROR:

break;

}

If above way is correct the statement 'ADCD2.state' itself is not working! Can anybody clarify the issue? What other settings are required?

Thanks in advance for your help.

Mike.

#adc
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
11 REPLIES 11
ssk
Associate II
Posted on April 28, 2015 at 16:40

Thanks Erwan for your help. I tried implementing the circular mode but it always gets stuck in function 'ADC_Conversion_Callback' and never allows to reach the main endless loop. If I put breatpoint in above function it is found there always.

I also tried using external int EIRQ17 for displaying the updated value but it is considerable time to update the actual value. Can you please guide in both the above cases?

Thanks in for your help.

Mike.

Erwan YVIN
ST Employee
Posted on April 29, 2015 at 13:42

Hello Mike ,

Could you try to increase the priority of your EIRQ17 (PSR to set) ?

we have a ADC priority

#define SPC5_ADC_ADC0_WD_PRIORITY           12

#define SPC5_ADC_ADC0_EOC_PRIORITY          SPC5_ADC_ADC0_WD_PRIORITY

if the problem persists , could you send me your application ?

  Best regards

Erwan