<?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: XRDC code example in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610907#M36095</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bogdan,&lt;/P&gt;&lt;P&gt;my xRDC knowledge is pure theoretical in this stage. Nevertheless,&amp;nbsp;please refer to my comments for given steps in your code:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;write 0x80000001 to XRDC_MDA_W0_0 register&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;This shall be enough to assign Master0 to DomainID=1; If you need to assign the same Master to more domains you need perform writes to other registers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;2. &amp;nbsp;Shall be OK.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;3. I believe you need to setup more MRGDs. Memory Region Controller can have up to 16 MRGDs for each MRC to protect some memory resource, for example XRDC_MRC0 can be for protecting access to Flash and&amp;nbsp;&lt;SPAN&gt;XRCD_MRC1 for protecting access to RAM. Can you please point me to the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;Rayleigh part number so I can look at XRDC setup on this particular part?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Kind regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Martin M.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2017 15:18:00 GMT</pubDate>
    <dc:creator>MarMi</dc:creator>
    <dc:date>2017-04-04T15:18:00Z</dc:date>
    <item>
      <title>XRDC code example</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610904#M36092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working on a communication driver for Rayleigh and have to implement a safety feature using the Extended Resource Domain Controller (XRDC). As the Reference Manual is ambiguous in this regard (and the web isn't much more helpful), I was wondering if anyone has any code example using XRDC to share. It would be very helpful for understanding the way it is intended to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bogdan&lt;/P&gt;&lt;P&gt;NXP Romania&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 08:41:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610904#M36092</guid>
      <dc:creator>bogdan-folea</dc:creator>
      <dc:date>2017-03-23T08:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: XRDC code example</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610905#M36093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bogdan,&lt;/P&gt;&lt;P&gt;I don't have software example but more recently spent some time to understand it so hopefully will be able to help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any specific question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Martin M.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 19:05:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610905#M36093</guid>
      <dc:creator>MarMi</dc:creator>
      <dc:date>2017-03-27T19:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: XRDC code example</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610906#M36094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reading the manual multiple times, I came up with a simple test case, just to make sure it works the way I think it does: I assigned all of the bus masters to the same domain, then gave everyone full access rights&amp;nbsp;on the whole memory and all the peripherals. This is what I did (in the exact order):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. assigned domain id 1 to all bus masters and set the validity bits&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- wrote 0x80000001 to all XRDC_MDA_W0_n registers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. gave every domain full &lt;SPAN&gt;access rights to all the peripherals and set the validity bits&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- &lt;SPAN&gt;wrote 0x00FFFFFF&amp;nbsp;to all XRDC_PDAC_W0_n registers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- wrote 0x80000000 to all XRDC_PDAC_W1_n registers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. configured a memory region containing the whole range of memory addresses, set full access rights for all domains and set the validity bit&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- wrote 0x00000000 to XRDC_MRGD_W0_0 (start address)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- wrote 0xFFFFFFFF to XRDC_MRGD_W1_0 (end address)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- wrote 0x00FFFFFF&amp;nbsp;to XRDC_MRGD_W2_0 (access policy)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- wrote 0x80000000 to XRDC_MRGD_W3_0 (validity bit)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4. set the global enable bit in the control register&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;- wrote 0x00000001 to XRDC_CR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It all seemed to go well until the global enable, at which point I got denied any access to the memory or memory-mapped I/O. I used a Lauterbach T32 debugger to run my application step-by-step and test memory availability. I must have missed some step, or wrote the registers in the wrong order. I'd be grateful if you could point out the mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Bogdan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 14:09:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610906#M36094</guid>
      <dc:creator>bogdan-folea</dc:creator>
      <dc:date>2017-03-31T14:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: XRDC code example</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610907#M36095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bogdan,&lt;/P&gt;&lt;P&gt;my xRDC knowledge is pure theoretical in this stage. Nevertheless,&amp;nbsp;please refer to my comments for given steps in your code:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;write 0x80000001 to XRDC_MDA_W0_0 register&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;This shall be enough to assign Master0 to DomainID=1; If you need to assign the same Master to more domains you need perform writes to other registers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;2. &amp;nbsp;Shall be OK.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;3. I believe you need to setup more MRGDs. Memory Region Controller can have up to 16 MRGDs for each MRC to protect some memory resource, for example XRDC_MRC0 can be for protecting access to Flash and&amp;nbsp;&lt;SPAN&gt;XRCD_MRC1 for protecting access to RAM. Can you please point me to the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;Rayleigh part number so I can look at XRDC setup on this particular part?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Kind regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Martin M.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 15:18:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610907#M36095</guid>
      <dc:creator>MarMi</dc:creator>
      <dc:date>2017-04-04T15:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: XRDC code example</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610908#M36096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your input. I tried to assign a domain just to the CM4 core (MDAC0/MDAC1 on Rayleigh) but I still have some trouble with memory region descriptors. I found that MRC1 seems to be responsible for SRAM, but it doesn't actually matter if I configure any descriptors. After I enable XRDC I'm always able to access just the SRAM and nothing else - not even XRDC (trying to disable it generates a bus error). This struck me as rather odd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to find some clear setup instructions or code for Rayleigh (or similar e.g. I.MX6) but with no luck so far. The part number you requested is&amp;nbsp;&lt;SPAN&gt;0N98K P63242 and the ID is&amp;nbsp;PAC58R5XXK1YMX6.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Bogdan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 17:41:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610908#M36096</guid>
      <dc:creator>bogdan-folea</dc:creator>
      <dc:date>2017-04-07T17:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: XRDC code example</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610909#M36097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bogdan,&lt;/P&gt;&lt;P&gt;I got manual of the &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Rayleigh&amp;nbsp;&lt;/SPAN&gt;device.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is Memory Region Controller assignment to protected slaves.&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/2111iBEF7710D3F627246/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Provided you don't configure access to XRDC prior it is enabled then access will not be granted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to allow access to XRDC (placed @ AIPS-0, slots 28-to-31), I think you should do these steps:&lt;/P&gt;&lt;P&gt;==&lt;/P&gt;&lt;P&gt;1. Program XRDC_MRC3 (XRDC_MRGD_Wx_48) to allow access into AIPS0 address range for given domainID&lt;/P&gt;&lt;P&gt;2. Program XRDC_PAC0 (XRDC_PDAC_Wx_028 -&amp;nbsp;XRDC_PDAC_Wx_031) to allow access to all four XRDC peripheral slots for given domainID&lt;/P&gt;&lt;P&gt;3. Some registers, for example XRDC_CR requires core master to use Secure Privileged access attribute to be able to read it or modify and therefore you might need to setup also respective XRDC_PID for generating secure access attribute { PID[5] = 1 }.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I cannot try practically on board this setting and therefore my advice is pure theoretical based on understanding XRDC block IP. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Martin M.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/Robert_fsl"&gt;Robert_fsl&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 14:41:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610909#M36097</guid>
      <dc:creator>MarMi</dc:creator>
      <dc:date>2017-04-10T14:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: XRDC code example</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610910#M36098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your input. This seems to do the trick. I had previously tried it with all region descriptors enabled and it didn't work, so it most certainly was the PID register. Thanks again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Bogdan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:05:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/XRDC-code-example/m-p/610910#M36098</guid>
      <dc:creator>bogdan-folea</dc:creator>
      <dc:date>2017-04-14T15:05:25Z</dc:date>
    </item>
  </channel>
</rss>

