<?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: K64F sysmpu conflicts with usb driver in Kinetis Software Development Kit</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1601253#M8174</link>
    <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/175930"&gt;@jiameng&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please tell us which memory regions are you trying to protect?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;If you are at peripheral address region (0x4000_0000-0x400F_FFFF), that could explain the incompatibility between MPU and USB, as USB work address is at 0x4003_5000 (USB DCD) and 0x4007_2000 (USB OTG FS/LS). These addresses should be accessible for USB to work. It might be good making these addresses accessible for both (MPU and USB) modules to work as expected.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Related with the Ethernet module, this one has an address 0x400C_0000, so it is in the peripheral address region too.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;SYSMPU_Enable(SYSMPU, 0) is necessary because setting 0 (false) the VLD (Valid) bit in CESR allows all accesses from all bus masters allowed; eliminating or ignoring this won't let USB to work, as VLD is set to 1 when the MCU resets, and MPU don't let USB access.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_2-1676651476865.png" style="width: 554px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/211413i9F1A9F8DE3DE5BCF/image-dimensions/554x190?v=v2" width="554" height="190" role="button" title="RaulRomero_2-1676651476865.png" alt="RaulRomero_2-1676651476865.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;[K64 Reference Manual. Chapter 19. Memory Protection Unit]&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Please look at K64 Sub-Family Reference Manual. Chapter 4. Memory Map. and Chapter 19. Memory Protection Unit (MPU) for more information.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2023 16:46:03 GMT</pubDate>
    <dc:creator>RaRo</dc:creator>
    <dc:date>2023-02-17T16:46:03Z</dc:date>
    <item>
      <title>K64F sysmpu conflicts with usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1598276#M8171</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I was developing a USB application on a frdm-k64f development board, based on the SDK demo host_msd_command_bm. Besides the USB driver in my application, I also need to protect some memory regions using sysmpu. I found a code that explicitly disable sysmpu in host_msd_command_bm:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;static void USB_HostApplicationInit(void)
{
    ...
#if ((defined FSL_FEATURE_SOC_SYSMPU_COUNT) &amp;amp;&amp;amp; (FSL_FEATURE_SOC_SYSMPU_COUNT))
    SYSMPU_Enable(SYSMPU, 0);
#endif /* FSL_FEATURE_SOC_SYSMPU_COUNT */
    ...
    usb_echo("host init done\r\n");
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it doesn't work if I comment SYSMPU_Enable(SYSMPU, 0) out and replace with my sysmpu initialization code. The symptom was that USB device failed to be enumerated. It seems that usb driver conflicts with sysmpu. Can anyone advise this?&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 15:49:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1598276#M8171</guid>
      <dc:creator>jiameng</dc:creator>
      <dc:date>2023-02-13T15:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: K64F sysmpu conflicts with usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1598983#M8172</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/175930"&gt;@jiameng&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Without replacing it with your SYSMPU initialization code, if you only comment the SYSMPU_Enable(SYSMPU, 0) out, the symptom still persists?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;If not, just for double check, could you please check out your SYSMPU initialization code?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;It might be useful to try out the SYSMPU example and combine it with the USB MSD Host Command BM example.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:03:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1598983#M8172</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-02-14T16:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: K64F sysmpu conflicts with usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1599002#M8173</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206649"&gt;@RaRo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, even if I simply comment SYSMPU_Enable(SYSMPU, 0) out, the problem still persists. Additionally, besides USB demos, I noticed that ethernet demos including lwip have also explicitly disabled sysmpu. I guess both USB and ethernet are conflict with sysmpu.&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:26:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1599002#M8173</guid>
      <dc:creator>jiameng</dc:creator>
      <dc:date>2023-02-14T16:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: K64F sysmpu conflicts with usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1601253#M8174</link>
      <description>&lt;P class="lia-align-justify"&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/175930"&gt;@jiameng&lt;/a&gt;,&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Could you please tell us which memory regions are you trying to protect?&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;If you are at peripheral address region (0x4000_0000-0x400F_FFFF), that could explain the incompatibility between MPU and USB, as USB work address is at 0x4003_5000 (USB DCD) and 0x4007_2000 (USB OTG FS/LS). These addresses should be accessible for USB to work. It might be good making these addresses accessible for both (MPU and USB) modules to work as expected.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Related with the Ethernet module, this one has an address 0x400C_0000, so it is in the peripheral address region too.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;SYSMPU_Enable(SYSMPU, 0) is necessary because setting 0 (false) the VLD (Valid) bit in CESR allows all accesses from all bus masters allowed; eliminating or ignoring this won't let USB to work, as VLD is set to 1 when the MCU resets, and MPU don't let USB access.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RaulRomero_2-1676651476865.png" style="width: 554px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/211413i9F1A9F8DE3DE5BCF/image-dimensions/554x190?v=v2" width="554" height="190" role="button" title="RaulRomero_2-1676651476865.png" alt="RaulRomero_2-1676651476865.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;[K64 Reference Manual. Chapter 19. Memory Protection Unit]&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Please look at K64 Sub-Family Reference Manual. Chapter 4. Memory Map. and Chapter 19. Memory Protection Unit (MPU) for more information.&lt;/P&gt;
&lt;P class="lia-align-justify"&gt;Best regards, Raul.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 16:46:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/K64F-sysmpu-conflicts-with-usb-driver/m-p/1601253#M8174</guid>
      <dc:creator>RaRo</dc:creator>
      <dc:date>2023-02-17T16:46:03Z</dc:date>
    </item>
  </channel>
</rss>

