<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>delay in keil</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/30662/delay-in-keil</link><description> 
hi , suppose i want to plot a sine wave of frequency 50hz in logic
analyser of keil microvision 4 using any pin of corresponding adc1
input. FOR THIS to plot i have to set delay .can anyone tell me , how
to calculate that delay time?? I am using stm32f103</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: delay in keil</title><link>https://community.arm.com/thread/128229?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2013 21:33:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:697b8520-6fbe-4ee6-926f-0506a8517378</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
Requirement :- 50Hz&lt;br /&gt;
No. of points to be plotted in 1 sec :- 1000 (taking a multiple of 50
to make calculations easier)&lt;br /&gt;
Time delay after which each Start Of Conversion must triggered =
1mSec&lt;/p&gt;

&lt;p&gt;
Now trigger the ADC conversion at 1msec time interval.&lt;/p&gt;

&lt;p&gt;
Use a timer to generate delay (software delay is unreliable and
stochastic). And in the timer interrupt, start ADC conversion.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: delay in keil</title><link>https://community.arm.com/thread/120093?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2013 13:14:07 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b9dbb6bc-d4b7-4f2d-a7e8-32742fc2a20b</guid><dc:creator>myaun jimi</dc:creator><description>&lt;p&gt;&lt;p&gt;
hi sir ,&lt;br /&gt;
Thanks again .I am asking a very silly question .I have taken the
array size 1024. and for execution it is taking 1 sec .then my
sampling rate must be 1024 .IS that so ??(I am giving input signal
50hz)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: delay in keil</title><link>https://community.arm.com/thread/118417?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2013 09:45:40 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:df89e413-a597-4dfc-bcb8-8d2d9b29803f</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
Software spin loops are a very crude way of doing delays. You&amp;#39;d
need to play with the iterations to get the rate you want, would
suggest using a toggling GPIO to calibrate the delay if you insist on
that route. You&amp;#39;d want the loop counter to be volatile so that the
compiler does not eliminate the code.&lt;/p&gt;

&lt;p&gt;
You need a sample rate of 51.2 KHz (50 Hz x 1024 samples), that&amp;#39;s
not cleanly divisible into 72 MHz, but would be into 64 MHz. One
could trigger the ADC/DMA by using a period of 1250 ticks of the 64
MHz system clock.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: delay in keil</title><link>https://community.arm.com/thread/81304?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2013 06:16:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:79962aee-9f2b-44fa-936a-30855d5f4f5d</guid><dc:creator>myaun jimi</dc:creator><description>&lt;p&gt;&lt;p&gt;
hi , thank u sir, I am using dma interrupt to store adc value.my
array size is 1024. i want to plot 1024 points in one second giving
50 hz sine wave. But I am getting at around 52 hz .I am using simple
for() delay to reduce adc sampling rate. Is their any way to tackle
adc sampling rate ?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: delay in keil</title><link>https://community.arm.com/thread/62046?ContentTypeID=1</link><pubDate>Wed, 26 Jun 2013 05:22:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:67b9f060-dcf2-4bab-8fe3-6fe743a3f898</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
You&amp;#39;d pace the ADC with one TIM units, and record to an array with
DMA. You&amp;#39;d want a sample rate sufficient to capture the input with
the desired clarity. Do you want 10 points on each cycle of the sine
wave, or 100?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>