<?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 Register reading for MCF 5282 in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Register-reading-for-MCF-5282/m-p/207934#M9988</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can anyone tell me, How to&amp;nbsp;read the&amp;nbsp;CPU space registers data(for e.g. VBR, FLASHBAR, RAMBAR, SR,....) of MCF5282.&lt;/DIV&gt;&lt;DIV&gt;I want to copy the register data to a variable.&lt;/DIV&gt;&lt;DIV&gt;I need the sample piece of code in C language for any one CPU Space registers&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Dec 2008 23:59:55 GMT</pubDate>
    <dc:creator>CHRamesh</dc:creator>
    <dc:date>2008-12-06T23:59:55Z</dc:date>
    <item>
      <title>Register reading for MCF 5282</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Register-reading-for-MCF-5282/m-p/207934#M9988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can anyone tell me, How to&amp;nbsp;read the&amp;nbsp;CPU space registers data(for e.g. VBR, FLASHBAR, RAMBAR, SR,....) of MCF5282.&lt;/DIV&gt;&lt;DIV&gt;I want to copy the register data to a variable.&lt;/DIV&gt;&lt;DIV&gt;I need the sample piece of code in C language for any one CPU Space registers&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Dec 2008 23:59:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Register-reading-for-MCF-5282/m-p/207934#M9988</guid>
      <dc:creator>CHRamesh</dc:creator>
      <dc:date>2008-12-06T23:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Register reading for MCF 5282</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Register-reading-for-MCF-5282/m-p/207935#M9989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I was under the impression CPU space was write-only.&amp;nbsp; The movec instruction says:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;Description: Moves the contents of the general-purpose register to the specified control register. This transfer is always 32 bits even though the control register may be implemented with fewer bits. &lt;FONT color="#ff0000"&gt;Note that the control registers are write only&lt;/FONT&gt;. The on-chip debug module can be used to read control registers. Note that this instruction synchronizes the pipeline.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV&gt;You can remember every time you update a CPU space register (by shadowing the update to a static variable) and you can do that in C with a routine like this (which is resilient to whatever selected calling convention you are using):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;static int&lt;BR /&gt;setvbr(uint32 x)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; move&amp;nbsp; x,d0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; movec d0,vbr&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Dec 2008 06:21:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Register-reading-for-MCF-5282/m-p/207935#M9989</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2008-12-07T06:21:45Z</dc:date>
    </item>
  </channel>
</rss>

