<?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>Vybrid ProcessorsのトピックRe: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
    <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285705#M2148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thread &lt;A _jive_internal="true" data-containerid="2023" data-containertype="14" data-objectid="308619" data-objecttype="1" href="https://community.nxp.com/thread/308619" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; color: #3778c7;"&gt;https://community.freescale.com/thread/308619&lt;/A&gt; has been answered by MQX team. The first call, &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;_mmu_vinit&lt;/SPAN&gt; will init mmu with default values. As you start adding more regions &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;_mmu_add_vregion, those get a new configuration values with the flags you are sending as arguments.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there should not be issues on enabling cache on the OCRAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Jun 2013 15:00:24 GMT</pubDate>
    <dc:creator>ioseph_martinez</dc:creator>
    <dc:date>2013-06-18T15:00:24Z</dc:date>
    <item>
      <title>Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285698#M2141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm experiencing very slow execution times with running code that controls GPIO pin signals on the Vybrid chip.&amp;nbsp; The code assert one GPIO then asserts another with only a few lines of code in-between to setup the LWPTIMER.&amp;nbsp; Its taking about 12 usec between these GPIO assertions which is about 10 times longer then it should base on how a similar set of operations was performed on another ARM processor (at about the same CPU clock speed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect slowness might be caused by reusing the current cache-disabled configuration that came with the example MQX programs but I'm having difficultyin finding documentation on how the add seperate memory regions where some have cache enable and others disabled.&amp;nbsp; I'm running everything using the intram.icf linker file so this maps all code/data to internal memory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example MQX user_config.hhas cache disabled (#define MQX_USE_UNCACHED_MEM 1).&amp;nbsp; However, when I tried to review this "compile-time" option under the MQX user guide document, it doesn't even mention this symbol (3.14.1 MQX Compile-time COnfiguration Options). So then I started looking at the PSP component code to reverse engineer the MMU calls but that lead to a dead end per the MQX reference manual statement on any of the MMU API's ("see the PSP Release Note").&amp;nbsp; But I can't find the "PSP Release Note" document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe that turning on cache would fix the slowness here but what are the consequences of this (why didn't MQX example programs come with data-cache enabled instead of disabled)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to just update/change the MQX_USE_UNCACHED_MEM to a value of 0 instead but that appears to enable it for all memory which I can at least tell me if the execution speeds up (assuming it doesn't break another else given the lack of documentation for it)...&amp;nbsp; However, I will eventually still need to have separate regions of cache/no-cache.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Paul Holmquist Updating MQX_USE_UNCACHED_MEM had no effect.&amp;nbsp; Which is what I suspected after reviewing the logic in init_bsp.c:_bsp_enable_card().&amp;nbsp; The following "_mmu_add_vregion" calls don't even appear to be consistent with the intram.icf since its using the "PSP_PAGE_TYPE_CACHE_NON" attribute on the internal ram.&amp;nbsp; Besides that, the ram size doesn't even seem match the size in the intram.icf file contents... why is this OK...? /* add region in sram area */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mmu_add_vregion((pointer)__INTERNAL_SRAM_BASE, (pointer)__INTERNAL_SRAM_BASE, (_mem_size) 0x00100000, PSP_PAGE_TABLE_SECTION_SIZE(PSP_PAGE_TABLE_SECTION_SIZE_1MB) | PSP_PAGE_TYPE(PSP_PAGE_TYPE_CACHE_NON)&amp;nbsp;&amp;nbsp; | PSP_PAGE_DESCR(PSP_PAGE_DESCR_ACCESS_RW_ALL));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 21:01:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285698#M2141</guid>
      <dc:creator>paulholmquist</dc:creator>
      <dc:date>2013-06-10T21:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285699#M2142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.2us between pulses is on the quick side even for a 500 MHz A5 (Vybrid).&amp;nbsp; Can you describe more about the pulse requirements in terms of min/max between them?&amp;nbsp; It might be worth considering one of the many Vybrid peripherals to drive these 2 pulses, especially if the timing needs to be well controlled -- software is notorious for unreliable "fast" GPIO timing :smileyhappy: (even my software!), just a thought, Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 11:23:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285699#M2142</guid>
      <dc:creator>ChrisNielsen</dc:creator>
      <dc:date>2013-06-11T11:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285700#M2143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Independent of the slowness of the GPIO signals, I need to enable cache on different regions of internal RAM.&amp;nbsp; The documentation is lacking on both Vybrid data sheet and MQX with respect to MMU/Cache details.&amp;nbsp; The only one that I found that comes close is the MMU description for a Cortex A8 (didn't find anything under A5) on the freescale web site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Per function _bsp_enable_card() in init_bsp.c, the code has the following statements for configuring MMU/CACHE:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* None cacheable is comon with strongly ordered. MMU doesnt work with another init configuration */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mmu_vinit(PSP_PAGE_TABLE_SECTION_SIZE(PSP_PAGE_TABLE_SECTION_SIZE_1MB) | PSP_PAGE_DESCR(PSP_PAGE_DESCR_ACCESS_RW_ALL) | PSP_PAGE_TYPE(PSP_PAGE_TYPE_STRONG_ORDER), (pointer)L1PageTable);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* add region in sram area */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _mmu_add_vregion((pointer)__INTERNAL_SRAM_BASE, (pointer)__INTERNAL_SRAM_BASE, (_mem_size) 0x00100000, PSP_PAGE_TABLE_SECTION_SIZE(PSP_PAGE_TABLE_SECTION_SIZE_1MB) | PSP_PAGE_TYPE(PSP_PAGE_TYPE_CACHE_NON)&amp;nbsp;&amp;nbsp; | PSP_PAGE_DESCR(PSP_PAGE_DESCR_ACCESS_RW_ALL));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to disable cache for all internal RAM.&amp;nbsp; Could I just replace the PSP_PAGE_TYPE_CACHE_NON above with PSP_PAGE_TYPE_CACHE_WBNWA instead?&amp;nbsp; Would this jeopardize all the logic that works with memory-mapped registers or cause other issues with MQX that I'm not aware of?&amp;nbsp; The comment above the _mmu_vinit calls seems to indicate forcing non-cache with "strong-ordered" is required.&amp;nbsp; If thats the case what combination is acceptiable here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then the comment "MMU doesn't work with another init configuration" above suppose to mean?&amp;nbsp; Does this mean the MMU on Vybrid is broken?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 20:43:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285700#M2143</guid>
      <dc:creator>paulholmquist</dc:creator>
      <dc:date>2013-06-11T20:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285701#M2144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not designed for MQX, but it's possible that this working MMU/cache example for a bare metal system might help the debug:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/326432#326432"&gt;Vybrid Bare-Metal MMU (Direct Mapping)&lt;/A&gt; &lt;/H1&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/326432#326432"&gt;https://community.freescale.com/message/326432#326432&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 11:10:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285701#M2144</guid>
      <dc:creator>ChrisNielsen</dc:creator>
      <dc:date>2013-06-12T11:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285702#M2145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure about those comments or why the cache comes disabled by default, will ask internally.&lt;/P&gt;&lt;P&gt;The OCRAM address range should not interfere with any of the memory mapped registers and so, they are mapped to different locations. &lt;/P&gt;&lt;P&gt;I would check is how this is done when having everything in external RAM (DDR) and copy that, just changing to OCRAM addresses and range.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 14:33:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285702#M2145</guid>
      <dc:creator>ioseph_martinez</dc:creator>
      <dc:date>2013-06-12T14:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285703#M2146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just modified _bsp_enable_card() as Ioseph suggested replacing *CACHE_NON with *CACHE_WBNWA for internal RAM and recompiled the bsp libirary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I remeasured the GPIO assertion times which resulted much faster execution interval of 2.3 usec between the pins (instead of the 12 usec before).&amp;nbsp; This confirms that having cache disabled was the issue here.&amp;nbsp; The only issue now is what consequence of this is with regard to MQX kernel and the MQX examples applications...still looking for documentation for both.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 20:27:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285703#M2146</guid>
      <dc:creator>paulholmquist</dc:creator>
      <dc:date>2013-06-12T20:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285704#M2147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul, I posted this &lt;A _jive_internal="true" href="https://community.nxp.com/thread/308619"&gt;https://community.freescale.com/thread/308619&lt;/A&gt; on the MQX forum. I don't think there should be any problems with the change you did but I want to confirm with the MQX team.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 18:38:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285704#M2147</guid>
      <dc:creator>ioseph_martinez</dc:creator>
      <dc:date>2013-06-17T18:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Slow execution causing lag in GPIO signals (trying to enable cache to speedup)</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285705#M2148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thread &lt;A _jive_internal="true" data-containerid="2023" data-containertype="14" data-objectid="308619" data-objecttype="1" href="https://community.nxp.com/thread/308619" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff; color: #3778c7;"&gt;https://community.freescale.com/thread/308619&lt;/A&gt; has been answered by MQX team. The first call, &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;_mmu_vinit&lt;/SPAN&gt; will init mmu with default values. As you start adding more regions &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;_mmu_add_vregion, those get a new configuration values with the flags you are sending as arguments.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So there should not be issues on enabling cache on the OCRAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 15:00:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/Slow-execution-causing-lag-in-GPIO-signals-trying-to-enable/m-p/285705#M2148</guid>
      <dc:creator>ioseph_martinez</dc:creator>
      <dc:date>2013-06-18T15:00:24Z</dc:date>
    </item>
  </channel>
</rss>

