<div dir="ltr">Alex, I'll bet the wait() function runs off an interrupt using a counter based on the CPUs frequency which is probably more accurate, but has the issue of using an interrupt. I've seen this type of thing before, but I don't know if it actually applies in your case.<div><br></div><div>~Carl</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 25, 2016 at 2:45 PM, Alex Davis via TriEmbed <span dir="ltr"><<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On Fri, Apr 22, 2016, at 03:03 PM, Alex Davis wrote:<br>
> I reworked the semaphore passing examine from day 2 of the FreeRTOS<br>
> workshop to conform with MBED specifics. I've published the code here:<br>
> <a href="https://developer.mbed.org/users/uhclem/code/FreeRTOS-led-blink-semaphore2/" rel="noreferrer" target="_blank">https://developer.mbed.org/users/uhclem/code/FreeRTOS-led-blink-semaphore2/</a><br>
</span>snip...<br>
<span class="">> The only other thing I may try is replace wait() with the inline<br>
> "Delay()" function used in the class example. I doubt it matters.<br>
<br>
</span>As it turns out, it matters. You can't use wait(). I guess I'll<br>
eventually figure out why.<br>
<br>
I used the Delay() function from the class instead:<br>
void Delay(__IO uint32_t nCount)<br>
{<br>
    nCount = nCount*10000;<br>
  while(nCount--)<br>
  {<br>
  }<br>
}<br>
<br>
Now it works!<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
"The theater of noise is proof of our potential."<br>
|\ |  (¯  \/ |¯\  |V| |\ ¯|¯ |¯) | \/ | | | |¯\ (¯   /¯  /\ |V|<br>
|-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |<br>
<br>
You won't find me on Facebook.<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<a href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">-------------------------------------------------------------------------------<br>Carl J. Nobile (Software Engineer)<br><a href="mailto:carl.nobile@gmail.com" target="_blank">carl.nobile@gmail.com</a><br>-------------------------------------------------------------------------------</div>
</div>