<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; User Favorites: FreeRTOS.org</title>
		<link><a href='http://forums.leaflabs.com/profile.php?id=4120'>4120</a></link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:14:20 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?profile=4120" rel="self" type="application/rss+xml" />

		<item>
			<title>Phono on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-15232</link>
			<pubDate>Thu, 20 Sep 2012 08:41:26 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">15232@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;higwoshy, you got it!&#60;br /&#62;
It was only a matter of stack size. I had specified 100 for the size of all the 3 tasks. I set this to the maximum that I could use, which is 560. Why, I do not know. For larger stacks, I get no warning at compile time, but the sketch crashes.&#60;br /&#62;
Thank a lot for the suggestion!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>higwoshy on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-15194</link>
			<pubDate>Thu, 20 Sep 2012 05:31:34 +0000</pubDate>
			<dc:creator>higwoshy</dc:creator>
			<guid isPermaLink="false">15194@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I've used siprintf() under freetos with no problems, something like:-&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;static char _spf_buff[82];    // For siprintf GLOBAL

 static void vTempTask(void* pvParameters)
{
     .....

         siprintf(  _spf_buff, &#38;quot;Sample #%u: temperature = %u C\r\n&#38;quot;, samplecount, msb);
         SerialUSB.println(  _spf_buff);

     .....
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Not exactly safe though, but with a bit of twiddling I'm sure it could be made safer. I forget how freetos works - whether it task-switches in the middle of functions or waits until the end when you give up control, but either way it's possible to make it safe for multitasking.&#60;/p&#62;
&#60;p&#62;Also when creating tasks remember to setup enough stack size, i.e.&#60;br /&#62;
&#60;code&#62;xTaskCreate(vSineTask, (const signed char *)&#38;quot;Show sinewave&#38;quot;, configMINIMAL_STACK_SIZE, NULL, 1, NULL );&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Will create problems for any stack usage larger than a few longs (?look it up?), so change configMINIMAL_STACK_SIZE to something useful.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-15033</link>
			<pubDate>Wed, 19 Sep 2012 18:12:30 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">15033@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;&#38;gt; sprintf(Buffer, &#34;%+0.3d&#34;, Position);&#60;br /&#62;
Maybe you should use a format string which is simpler. %3d, ok; %03d, ok, %+03d, well if you like it; but %+0.3d is very strange, just try %+03d, or do you really think there was a difference ? I have never seen a . in a %d format, and have no idea what it should be good for.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>feurig on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-15011</link>
			<pubDate>Wed, 19 Sep 2012 13:22:48 +0000</pubDate>
			<dc:creator>feurig</dc:creator>
			<guid isPermaLink="false">15011@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I tried to use some of the replacement sprintfs using freertos and finally wound up giving up on it. Newlib and Freertos don't seem to play well with libmaple period.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14985</link>
			<pubDate>Wed, 19 Sep 2012 10:43:23 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">14985@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Phono -&#60;br /&#62;
&#60;blockquote&#62;BUT&#60;br /&#62;
the statement:&#60;br /&#62;
sprintf(Buffer, &#34;%+0.3d&#34;, Position);&#60;br /&#62;
from stdio.h of newlib DOES crash the sketch.&#60;br /&#62;
This statement worked fine in an earlier version of my sketch using only interrupts but no FreeRTOS.&#60;br /&#62;
My workaround was to write my own conversion routine.&#60;br /&#62;
Any idea why?&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;What's the definition of &#60;code&#62;Buffer&#60;/code&#62;, and how big is it?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Phono on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14946</link>
			<pubDate>Wed, 19 Sep 2012 07:55:30 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">14946@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;After some bug-chasing, I eventually found mistakes in my code. So there is no incompatibility between FreeRTOS and the timers,&#60;br /&#62;
BUT&#60;br /&#62;
the statement:&#60;br /&#62;
&#60;code&#62;sprintf(Buffer, &#38;quot;%+0.3d&#38;quot;, Position);&#60;/code&#62;&#60;br /&#62;
from stdio.h of newlib DOES crash the sketch.&#60;br /&#62;
This statement worked fine in an earlier version of my sketch using only interrupts but no FreeRTOS.&#60;br /&#62;
My workaround was to write my own conversion routine.&#60;br /&#62;
Any idea why?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>FreeRTOS.org on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14718</link>
			<pubDate>Tue, 18 Sep 2012 09:02:45 +0000</pubDate>
			<dc:creator>FreeRTOS.org</dc:creator>
			<guid isPermaLink="false">14718@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Several hours ago I posted a long reply to this, with helpful links, but it has not shown up in the thread.  Maybe the post is stuck with a moderator?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>x893 on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14698</link>
			<pubDate>Tue, 18 Sep 2012 07:37:17 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">14698@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;FreeRTOS can use own (by default) memory allocator. See configTOTAL_HEAP_SIZE and pvPortMalloc for details.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Phono on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14634</link>
			<pubDate>Tue, 18 Sep 2012 02:58:14 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">14634@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have checked the source files of FreeRTOS found in IDE as of 0.0.12, and found that (expectedly) the &#60;code&#62;xQueueCreate&#60;/code&#62; function invokes &#60;code&#62;Malloc&#60;/code&#62; twice.&#60;br /&#62;
This also the case in X893's version.&#60;br /&#62;
However, we can read in the Maple IDE documentation :&#60;br /&#62;
&#60;strong&#62;&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62; •If you’re looking for something from the C standard library (like atoi(), for instance): the CodeSourcery GCC compiler used to compile your programs is configured to link against newlib, and allows the use of any of its header files. However, dynamic memory allocation (malloc(), etc.) is not available.&#60;br /&#62;
&#60;/blockquote&#62;
&#60;/strong&#62;&#60;br /&#62;
Does this mean that dynamic memory allocation is not possible in this environment? And then, using it anyway collides with something else, making the timer code buggy?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>x893 on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14510</link>
			<pubDate>Mon, 17 Sep 2012 13:50:08 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">14510@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You can try my port FreeRTOS to Maple&#60;br /&#62;
&#60;a href=&#34;http://akb77.com/g/stm32/maple-stm32-library-for-freertos/&#34; rel=&#34;nofollow&#34;&#62;http://akb77.com/g/stm32/maple-stm32-library-for-freertos/&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14492</link>
			<pubDate>Mon, 17 Sep 2012 10:50:18 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">14492@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Phono - if it works without FreeRTOS then it might not be a Maple problem, it might be helpful to post this question to FreeRTOS too.&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Phono on "FreeRTOS incompatible with hardware timers?"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3671#post-14490</link>
			<pubDate>Mon, 17 Sep 2012 10:48:27 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">14490@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, I am writing a sketch for an Olimexino STM32 board where I want to use both FreeRTOS and a hardware timer, triggering an interrupt, and to which I attached an interrupt service routine.&#60;br /&#62;
I used the same timer and interrupt scheme with success in another sketch, but without FreeRTOS. This interrupt sends SPI messages, one per interrupt.&#60;br /&#62;
When I use FreeRTOS, the sktech does not work.&#60;br /&#62;
Specifically :&#60;br /&#62;
I have commented out every FreeRTOS-related statement. Eventually I found that the faulty statements are :&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;xQueueCommande = xQueueCreate( 20, sizeof( int16 ) );
  if( xQueueCommande == 0 )
    Error();&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If I uncomment this, the SPI does not send messages (seen on the scope). I do not know whether the interrupt service routine is actually called or not.&#60;br /&#62;
The Queue seems to be created since the error() function is not called (it flashes a LED).&#60;br /&#62;
So my question : is there a known incompatibility with the hardware timer? I tried Timer 1 and 2, both do the same.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
