<?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>topic Re: Type definitons - mcf5225.h in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205400#M4808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To access D0 (or any other core processor registers) from C code,&amp;nbsp;you could&amp;nbsp;use inline assembly. Search for 'asm' in codewarrior help. Here is&amp;nbsp;one example given in the codewarrior help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;long int b;&lt;/PRE&gt;&lt;A id="wp962924" name="wp962924" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;struct mystruct {&lt;/PRE&gt;&lt;A id="wp962925" name="wp962925" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  long int a;&lt;/PRE&gt;&lt;A id="wp962926" name="wp962926" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;} ;&lt;/PRE&gt;&lt;A id="wp962927" name="wp962927" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;static asm long f(void)     // Legal asm qualifier&lt;/PRE&gt;&lt;A id="wp962928" name="wp962928" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;{&lt;/PRE&gt;&lt;A id="wp962929" name="wp962929" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  move.l   struct(mystruct.a)(A0),D0 // Accessing a struct.&lt;/PRE&gt;&lt;A id="wp962930" name="wp962930" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  add.l    b,D0   // Using a global variable, put return value&lt;/PRE&gt;&lt;A id="wp962931" name="wp962931" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;                  // in D0.&lt;/PRE&gt;&lt;A id="wp962932" name="wp962932" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  rts             // Return from the function:&lt;/PRE&gt;&lt;A id="wp962933" name="wp962933" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;                  // result = mystruct.a + b &lt;/PRE&gt;&lt;A id="wp962934" name="wp962934" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;} &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Aug 2009 16:47:58 GMT</pubDate>
    <dc:creator>EAI</dc:creator>
    <dc:date>2009-08-06T16:47:58Z</dc:date>
    <item>
      <title>Type definitons - mcf5225.h</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205398#M4806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The controller that I am using is MCF52259.&lt;/P&gt;&lt;P&gt;1) How can I&amp;nbsp;read the general purpose register "D0"?&lt;/P&gt;&lt;P&gt;2) Is mcf5225.h the header file to be used for type definitons of the registers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If YES,&lt;/P&gt;&lt;P&gt;--&amp;gt;&amp;nbsp;The reset control register of M52259 is an 8 bit register, whereas, the file "mcf5225.h" specifies it as a 16 bit int.&lt;/P&gt;&lt;P&gt;" &lt;SPAN&gt;uint_16 RCON; // Reset Configuration Register"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Why is this change? Or is there a seperate header file for M52259?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Chen&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 12:40:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205398#M4806</guid>
      <dc:creator>lel_chen</dc:creator>
      <dc:date>2009-08-06T12:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Type definitons - mcf5225.h</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205399#M4807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) What is 'general purpose register D0' ?&lt;/P&gt;&lt;P&gt;2) Yes, it is used also for definitions of registers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Reset Configuration Register (RCON) is 16 bit wide register in mcf52259 (MCF52259 Ref. Manual, Rev. 1).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 14:26:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205399#M4807</guid>
      <dc:creator>JuroV</dc:creator>
      <dc:date>2009-08-06T14:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Type definitons - mcf5225.h</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205400#M4808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To access D0 (or any other core processor registers) from C code,&amp;nbsp;you could&amp;nbsp;use inline assembly. Search for 'asm' in codewarrior help. Here is&amp;nbsp;one example given in the codewarrior help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;long int b;&lt;/PRE&gt;&lt;A id="wp962924" name="wp962924" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;struct mystruct {&lt;/PRE&gt;&lt;A id="wp962925" name="wp962925" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  long int a;&lt;/PRE&gt;&lt;A id="wp962926" name="wp962926" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;} ;&lt;/PRE&gt;&lt;A id="wp962927" name="wp962927" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;static asm long f(void)     // Legal asm qualifier&lt;/PRE&gt;&lt;A id="wp962928" name="wp962928" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;{&lt;/PRE&gt;&lt;A id="wp962929" name="wp962929" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  move.l   struct(mystruct.a)(A0),D0 // Accessing a struct.&lt;/PRE&gt;&lt;A id="wp962930" name="wp962930" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  add.l    b,D0   // Using a global variable, put return value&lt;/PRE&gt;&lt;A id="wp962931" name="wp962931" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;                  // in D0.&lt;/PRE&gt;&lt;A id="wp962932" name="wp962932" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;  rts             // Return from the function:&lt;/PRE&gt;&lt;A id="wp962933" name="wp962933" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;                  // result = mystruct.a + b &lt;/PRE&gt;&lt;A id="wp962934" name="wp962934" target="_blank"&gt;&lt;/A&gt;&lt;PRE class="pL_Listing_Preformatted"&gt;} &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 16:47:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205400#M4808</guid>
      <dc:creator>EAI</dc:creator>
      <dc:date>2009-08-06T16:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Type definitons - mcf5225.h</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205401#M4809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, my question was not about Reset Config Register[RCON], but Reset Control Register [RCR] in the reset controller module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could find it in mcf5222.h as:&lt;/P&gt;&lt;P&gt;------------------------------------------------------&lt;/P&gt;&lt;P&gt;typedef struct mcf5222_cim_struct&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;uchar RCR; // Reset control register&lt;/P&gt;&lt;P&gt;uchar RSR; // Reset status register&lt;/P&gt;&lt;P&gt;.......................&lt;/P&gt;&lt;P&gt;--------------------------------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But not in mcf5225.h&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Aug 2009 17:08:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Type-definitons-mcf5225-h/m-p/205401#M4809</guid>
      <dc:creator>lel_chen</dc:creator>
      <dc:date>2009-08-06T17:08:56Z</dc:date>
    </item>
  </channel>
</rss>

