cancel
Showing results for 
Search instead for 
Did you mean: 

Bug on Spc560b50L5 on SPCstudio in ADC Use

nooshin_1382
Associate II
Posted on May 27, 2015 at 11:46

Hi

I Want to read ADC0 channels in SPC560B50L5 but when i use my code or use Spc Function's the mcu have no action , i use this function and test my function with SPC560B54L5 it is work correctly.

I Send my code if any problem exist on this pleaase help me .

If you can get me sample if ADC have not any bug .

Thanks So Much

Best Regards

Vanima Nazerian
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
3 REPLIES 3
Erwan YVIN
ST Employee
Posted on May 28, 2015 at 10:42 Hello Vanima , After Starting the conversion, your program is going to stop the conversion too quickly There are 2 Choices : (Cf

http://chibios.sourceforge.net/html/group___a_d_c.html

) 1) Use the Linear Buffer , after the EOC Callback .. your can let the driver stopping the conversion 2) Use Circular Buffer , you need to stop the conversion.. but let the time of MCU

/* Starts an ADC continuous conversion.*/
adcStartConversion(&ADCD1, &adc0_group_cfg0,samples, ADC0_GROUP_CFG0_BUF_DEPTH);
//adcStart(&ADCD1, NULL);
init();
/* Application main loop.*/
while
(1)
{
/* Let some time to stop the conversion */
osalThreadSleepMilliseconds(500);
adcStopConversion(&ADCD1);

on the RM , Fig 286 , There Are some useful timings on ADC Sampling But clearly , you stop too quickly the conversion. Let me know if you solve your issue. Best Regards Erwan
nooshin_1382
Associate II
Posted on June 02, 2015 at 08:05

Hi Erwan

I tested the ADC in SPC560B54L5 and it is worked thanks so much.

But i read the Document you refer me I set ADC timming correctlly like a datasheet but has no effect in SPC560B50L5

the SpcStudio has no any sample for this chip and this chip completly diffrent with other MCU family.

thanks so much

With Best Regards

Nazerian Vanima
Erwan YVIN
ST Employee
Posted on June 02, 2015 at 15:13

Hello Vanima ,

the difference is linked to the flash not the ADC ip.

Did you use a MiniModule or Discovery Board ?

You can find in the attachment , your application updated.

did you try an other HW ?

          Best Regards

                     Erwan