cancel
Showing results for 
Search instead for 
Did you mean: 

One thread use up all the computer time,which use ADC.

Linda
Associate II
Posted on October 07, 2014 at 16:46

I am adding a thread to STM32F429iDisco demo. This thread use ADC, it use all all the computer time, other thread do not response at all. I try to add code:

 vTaskDelay(1000); or  GUI_X_Delay(1000)

It still doesn't work. How to release some computer time to other thread/task?

Please help.

Thanks

#!espn
7 REPLIES 7
Linda
Associate II
Posted on October 08, 2014 at 20:34

I means it use all

microcontroller processing time

, other tasks can to response.

Please help.

thanks

Posted on October 08, 2014 at 21:03

Ok, but that sounds like a symptom, not the cause of the problem. Work on presenting exactly what you are doing significantly better.

0690X00000603IWQAY.jpg

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Linda
Associate II
Posted on October 09, 2014 at 17:06

Dear Clive1,

I couldn't get it, what do you mean? How to release some microcontrollor process time from one thread? Maybe the ADC have too high priority? how to lower it?

thanks

Posted on October 09, 2014 at 18:49

I couldn't get it, what do you mean?

You are focusing on the wrong problem. Focus on what's causing the problem. I can't magically see what your problem is, present it with completeness and clarity. If you keep restating the same set of facts I will ignore you.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on October 09, 2014 at 20:38

Maybe the ADC have too high priority?

Are you sampling at 5 Msps? Is that appropriate for your application? What would be appropriate? Do you use a interrupt to signal that new values are available?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Linda
Associate II
Posted on October 11, 2014 at 04:44

I  use:

 sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;

Linda
Associate II
Posted on October 13, 2014 at 11:15

Use this one GUI_Delay(200); it finally works.