cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ADC0 End of Conversion interrupt

nooshin_1382
Associate II
Posted on April 09, 2015 at 08:31

Hi 

I Want to use , End of Conversion interrupt in ADC0 but when i set the NSTART bit in ADC0- MCR register in debug mode i saw in SFR view  ,ADC0_ISR EOC bit is set but the interrupt is not work.

when i use while for this bit in my function i Read the ADC Correctly .

i Attach my code here if my code have problem please let me now.

thanks

With Best Regards

Nazerian Vanima
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
4 REPLIES 4
Erwan YVIN
ST Employee
Posted on April 30, 2015 at 10:08

Hello Vanima ,

Sorry for the late answer.

Did you solve your issue ?

I will check your source code with ADC Experts to determine why the interrupt is not handled.

         Best Regards

 

                  Erwan

nooshin_1382
Associate II
Posted on May 27, 2015 at 12:09

Hi Erwan

No the Problem is not Solved completly i should my MCU (SPC560B50L5) , i have bigger Problem the function's in this MCU completly different with (SPC560B54L5) , I saw a  bug on the Function when i want to use the mcu Stop on the position and the mcu Halt.

if you can Help me on this or send me an application for this Chip thanks so much.

Thanks for your Response

 Best Regards

Vanima Nazerian

Erwan YVIN
ST Employee
Posted on May 27, 2015 at 18:15

Hello Vanima ,

Tomorrow, we will focus on your issue posted in SPC5Studio & SPC56 on ADC.

Sorry , for again the delay ;)

           Best regards

                       Erwan

Erwan YVIN
ST Employee
Posted on May 28, 2015 at 13:18

Hello Vanima ,

For your source code coming from B54L5 you have forgotten to set the IMR. The Interrupt Mask Register (IMR) contains the interrupt enable bits for the ADC.

uint32_t ADC_Start_Conversion(

void

) {
uint32_t Result;
ADC_0.CIMR0.B.CIM0 = 1;
ADC_0.IMR.R = 3;
ADC_0.MCR.B.NSTART = 1;

After updating ADC_Start_Conversion , you can receive the EOC Interrupt. Best regards Erwan