<?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: Query regarding implementing RAM self test mechanism in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019656#M18427</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MQX needs RAM for the stacks, heap, and other data fields so it would be impossible to test all of the RAM if you are wanting to test the same RAM MQX is using. The only way to do this is to have use a different area of RAM like external SDRAM. If you are wanting to do this test at boot up you could minimize the area to avoid by writing bare metal code that ran before MQX starts, but even then some RAM is required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jan 2020 05:32:13 GMT</pubDate>
    <dc:creator>danielchen</dc:creator>
    <dc:date>2020-01-30T05:32:13Z</dc:date>
    <item>
      <title>Query regarding implementing RAM self test mechanism</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019652#M18423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using kinetis MK60FX512VMD15 controller having 128 KB SRAM and MQX RTOS version 4.2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to implement RAM self test mechanism as follows:&lt;/P&gt;&lt;P&gt;Write some test pattern (e.g. walking 1, walkin 0 etc) to RAM locations, read back the value from RAM locations and verify that the read value matches the written pattern. This way I would like to test the entire physical SRAM periodically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am thinking to create one Task using MQX provided API "_task_create()" that will take care of writing the test pattern to RAM locations, reading it back and verifying it.&lt;BR /&gt;This way the Task will try to access the physical RAM from its start location and will keep testing it until the RAM's end location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions are:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp;Can a Task access entire physical RAM so that I can start writing the test pattern from RAM start location and go until RAM end location ? &lt;BR /&gt;i.e. assuming the RTOS will allow this Task to access entire RAM without crashing/terminating the Task, even if this Task tries to write to a RAM address that may be mapped to another Task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp;How can I access complete physical RAM locations from above Task to perform above test at run time when my other tasks in system are also running ?&lt;BR /&gt;i.e. if I try to write the test pattern to a certain RAM location and if that location is mapped/assigned by RTOS to another Task, won't it corrupt the data that was used by other Task? &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Kindly let me know if this would be a correct approach or if you would like to suggest some different approach.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Swapnil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2019 12:50:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019652#M18423</guid>
      <dc:creator>swapnilv</dc:creator>
      <dc:date>2019-12-26T12:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding implementing RAM self test mechanism</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019653#M18424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swapnil:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe it is not possible to do a self test for the entire physical RAM while MQX RTOS is running. Because RTOS key components and structures , task stacks,... are also in the RAM space. The RAM test (write and read back) will corrupt the data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One possible way maybe do a RAM test before the MQX RTOS running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2020 06:43:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019653#M18424</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-01-07T06:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding implementing RAM self test mechanism</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019654#M18425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;found below defines in&amp;nbsp; ".icf" file:&lt;/P&gt;&lt;P&gt;define symbol __ICFEDIT_region_RAM_start__ = 0x1fff0000;&lt;BR /&gt;define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFF0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used "&lt;SPAN&gt;0x1fff0000" as start address for my test code, kept incrementing&amp;nbsp;it until address "0x2000FFF0" is reached, and ran below pseudo test code on all the RAM addresses/locations starting from address "&lt;/SPAN&gt;&lt;SPAN&gt;0x1fff0000" up-to&amp;nbsp;"0x2000FFF0".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please refer below pseudo code that i tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_int_disable();&amp;nbsp;&lt;BR /&gt; _task_stop_preemption();&lt;/P&gt;&lt;P&gt;//take "backup" of original data present at test RAM location so that we can restore the test RAM location with it&amp;nbsp;later.&lt;/P&gt;&lt;P&gt;//write test pattern to RAM location.&lt;/P&gt;&lt;P&gt;//Read RAM data and compare with test pattern written.&lt;/P&gt;&lt;P&gt;//If read value of RAM data matches the test pattern; SUCCESS.&lt;/P&gt;&lt;P&gt;//&lt;SPAN&gt;If read value of RAM data does not match the test pattern;&amp;nbsp;FAILURE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//Restore the test RAM location data that was taken as "backup" previously.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;_task_start_preemption();&lt;BR /&gt; _int_enable();&lt;/P&gt;&lt;P&gt;Repeat above pseudo code for next RAM location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way I was able to access the entire SRAM (From &lt;SPAN&gt;0x1fff0000 to&amp;nbsp;0x2000FFF0&lt;/SPAN&gt;) and could run my test successfully.&lt;/P&gt;&lt;P&gt;I verified that my test pattern was actually getting written in RAM addresses by monitoring the RAM contents in IAR IDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I have created&amp;nbsp; one low priority Task using "_task_create()" MQX API and I am running above test code from this Task periodically.&amp;nbsp;&lt;SPAN&gt;MQX RTOS is running and other application specific high priority Tasks are also running.&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&gt;I did not see any data corruption happening. I am disabling interrupts (&lt;SPAN style="color: #3d3d3d;"&gt;_int_disable()&amp;nbsp;&lt;/SPAN&gt;), stopping task preemption&amp;nbsp; (&lt;SPAN style="color: #3d3d3d;"&gt;_task_stop_preemption() )&amp;nbsp;&lt;/SPAN&gt;and restoring original RAM contents as soon as test pattern is verified, so looks like the possibility of data corruption is eliminated, correct?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see any problem with this approach?&lt;/P&gt;&lt;P&gt;Kindly let me know your thoughts on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Best Regards,&lt;/P&gt;&lt;P&gt;Swapnil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2020 15:02:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019654#M18425</guid>
      <dc:creator>swapnilv</dc:creator>
      <dc:date>2020-01-07T15:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding implementing RAM self test mechanism</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019655#M18426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please let me know your thoughts on above mentioned RAM testing approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;With Best Regards,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Swapnil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 09:07:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019655#M18426</guid>
      <dc:creator>swapnilv</dc:creator>
      <dc:date>2020-01-23T09:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query regarding implementing RAM self test mechanism</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019656#M18427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MQX needs RAM for the stacks, heap, and other data fields so it would be impossible to test all of the RAM if you are wanting to test the same RAM MQX is using. The only way to do this is to have use a different area of RAM like external SDRAM. If you are wanting to do this test at boot up you could minimize the area to avoid by writing bare metal code that ran before MQX starts, but even then some RAM is required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope that helps,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 05:32:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Query-regarding-implementing-RAM-self-test-mechanism/m-p/1019656#M18427</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-01-30T05:32:13Z</dc:date>
    </item>
  </channel>
</rss>

