<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S12 / MagniV MicrocontrollersのトピックShowing warning while using ssem and csem function for semaphore lockig and unlocking respectively</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Showing-warning-while-using-ssem-and-csem-function-for-semaphore/m-p/779636#M15508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I defined as follows with MC9S12XEP100 and using main CPU and XGATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define SET_SEMPHR_XGATE(sem_id)&amp;nbsp;&amp;nbsp; while((!_ssem(sem_id))&amp;amp;&amp;amp;(UI_t)(t1msec-Xgsem_timer)&amp;lt;msec1)){};&lt;/P&gt;&lt;P&gt;#define CLR_SEMPHR_XGATE(sem_id)&amp;nbsp; _csem(sem_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET_SEMPHR_XGATE(0)&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLR_SEMPHR_XGATE(0)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But while compiling with IDE 5.1 it showing as follow warnings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;warning: C1801 Implicit parameter declaration for '_ssem'&lt;/P&gt;&lt;P&gt;warning: C1801 Implicit parameter declaration for '_csem'&lt;/P&gt;&lt;P&gt;warning: C1420 Result of function call is ignored&amp;nbsp; (showing at CLR_SEMPHR_XGATE(0) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In example programs also _ssem &amp;amp; _csem are not available.&lt;/P&gt;&lt;P&gt;Please provide solution to eliminate all warnings as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2018 05:35:40 GMT</pubDate>
    <dc:creator>maddularajesh</dc:creator>
    <dc:date>2018-02-02T05:35:40Z</dc:date>
    <item>
      <title>Showing warning while using ssem and csem function for semaphore lockig and unlocking respectively</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Showing-warning-while-using-ssem-and-csem-function-for-semaphore/m-p/779636#M15508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I defined as follows with MC9S12XEP100 and using main CPU and XGATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define SET_SEMPHR_XGATE(sem_id)&amp;nbsp;&amp;nbsp; while((!_ssem(sem_id))&amp;amp;&amp;amp;(UI_t)(t1msec-Xgsem_timer)&amp;lt;msec1)){};&lt;/P&gt;&lt;P&gt;#define CLR_SEMPHR_XGATE(sem_id)&amp;nbsp; _csem(sem_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET_SEMPHR_XGATE(0)&amp;nbsp;&lt;/P&gt;&lt;P&gt;CLR_SEMPHR_XGATE(0)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But while compiling with IDE 5.1 it showing as follow warnings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;warning: C1801 Implicit parameter declaration for '_ssem'&lt;/P&gt;&lt;P&gt;warning: C1801 Implicit parameter declaration for '_csem'&lt;/P&gt;&lt;P&gt;warning: C1420 Result of function call is ignored&amp;nbsp; (showing at CLR_SEMPHR_XGATE(0) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In example programs also _ssem &amp;amp; _csem are not available.&lt;/P&gt;&lt;P&gt;Please provide solution to eliminate all warnings as soon as possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 05:35:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Showing-warning-while-using-ssem-and-csem-function-for-semaphore/m-p/779636#M15508</guid>
      <dc:creator>maddularajesh</dc:creator>
      <dc:date>2018-02-02T05:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Showing warning while using ssem and csem function for semaphore lockig and unlocking respectively</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Showing-warning-while-using-ssem-and-csem-function-for-semaphore/m-p/779637#M15509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maddula,&lt;/P&gt;&lt;P&gt;You are right, it seems that _csem() and _csem() functions are not implemented in CW files – just defined in intrinsics_xgate.h file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact, such functions may be quite redundant since they should do just single assembler commands.&lt;/P&gt;&lt;P&gt;You may use&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;asm&lt;/SPAN&gt; SSEM #sem_id&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;instruction for semaphore locking try.&lt;/P&gt;&lt;P&gt;Additionally, you should check result whether semaphore was locked or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, you may use&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;asm&lt;/SPAN&gt; CSEM #sem_id&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;for semaphore release.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please look at attached simple example code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Feb 2018 15:39:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Showing-warning-while-using-ssem-and-csem-function-for-semaphore/m-p/779637#M15509</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2018-02-12T15:39:01Z</dc:date>
    </item>
  </channel>
</rss>

