<?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 MPU violation in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MPU-violation/m-p/2126313#M20630</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working on the MPU module of S912XEP768BVAG .&lt;BR /&gt;I have applied write and execution protection ,but I am not able to get the violation while trying to write or execute at address in between the configured protected range .&lt;BR /&gt;CPU User is configured as the master.&lt;BR /&gt;Please could you help me in verifying if the below is correct.&lt;/P&gt;&lt;P&gt;Pasting the test code below:&lt;/P&gt;&lt;P&gt;Start address : 0x7E3620 /**&amp;lt; global start address */&lt;BR /&gt;End address : 0x7E8595 /**&amp;lt; global end address */&lt;/P&gt;&lt;P&gt;Read only access for CPU user only, writing and execution protection.&lt;/P&gt;&lt;P&gt;/*Test code start*/&lt;/P&gt;&lt;P&gt;FAR_DATA GLOBALADR tUI32 *address_test_gConst = (FAR_DATA GLOBALADR tUI32 *)(0x7E3800);&lt;BR /&gt;/*usage in execute testcase*/&lt;BR /&gt;funcptr1 funct1_gConst = (FAR_DATA GLOBALADR funcptr1) 0x7E3800;&lt;/P&gt;&lt;P&gt;switch(TestSection_Num)&lt;BR /&gt;{&lt;BR /&gt;case 1:&lt;/P&gt;&lt;P&gt;AddressUnderTest = 0x7E3800 ;&lt;BR /&gt;/*Testcases for MPU testing */&lt;BR /&gt;if(Testcase_Num==1)&lt;BR /&gt;{&lt;BR /&gt;Read_Successful = FALSE;&lt;BR /&gt;/* read */&lt;BR /&gt;data_read1 = *(FAR_DATA GLOBALADR tUI16*)address_test_gConst;&lt;BR /&gt;if(data_read1 == *(FAR_DATA GLOBALADR tUI16*)address_test_gConst)&lt;BR /&gt;{&lt;BR /&gt;Read_Successful = TRUE;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else if(Testcase_Num==2)&lt;BR /&gt;{&lt;BR /&gt;Write_Successful = FALSE;&lt;/P&gt;&lt;P&gt;/*write */&lt;BR /&gt;*(FAR_DATA GLOBALADR tUI16*)address_test_gConst =0x1234;&lt;BR /&gt;&lt;BR /&gt;if( *(FAR_DATA GLOBALADR tUI16*)address_test_gConst == 0x1234)&lt;BR /&gt;{&lt;BR /&gt;Write_Successful = TRUE;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else if(Testcase_Num==3)&lt;BR /&gt;{&lt;BR /&gt;Exe_Successful = FALSE;&lt;/P&gt;&lt;P&gt;*(FAR_DATA GLOBALADR tUI16*)address_test_gConst =0x0A00;&lt;BR /&gt;funct1_gConst();&lt;BR /&gt;Exe_Successful = TRUE;&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*Test code end*/&lt;/P&gt;&lt;P&gt;Please let know if you need more information from me .&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Krutika&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jul 2025 09:43:30 GMT</pubDate>
    <dc:creator>KrutikaK</dc:creator>
    <dc:date>2025-07-01T09:43:30Z</dc:date>
    <item>
      <title>MPU violation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MPU-violation/m-p/2126313#M20630</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working on the MPU module of S912XEP768BVAG .&lt;BR /&gt;I have applied write and execution protection ,but I am not able to get the violation while trying to write or execute at address in between the configured protected range .&lt;BR /&gt;CPU User is configured as the master.&lt;BR /&gt;Please could you help me in verifying if the below is correct.&lt;/P&gt;&lt;P&gt;Pasting the test code below:&lt;/P&gt;&lt;P&gt;Start address : 0x7E3620 /**&amp;lt; global start address */&lt;BR /&gt;End address : 0x7E8595 /**&amp;lt; global end address */&lt;/P&gt;&lt;P&gt;Read only access for CPU user only, writing and execution protection.&lt;/P&gt;&lt;P&gt;/*Test code start*/&lt;/P&gt;&lt;P&gt;FAR_DATA GLOBALADR tUI32 *address_test_gConst = (FAR_DATA GLOBALADR tUI32 *)(0x7E3800);&lt;BR /&gt;/*usage in execute testcase*/&lt;BR /&gt;funcptr1 funct1_gConst = (FAR_DATA GLOBALADR funcptr1) 0x7E3800;&lt;/P&gt;&lt;P&gt;switch(TestSection_Num)&lt;BR /&gt;{&lt;BR /&gt;case 1:&lt;/P&gt;&lt;P&gt;AddressUnderTest = 0x7E3800 ;&lt;BR /&gt;/*Testcases for MPU testing */&lt;BR /&gt;if(Testcase_Num==1)&lt;BR /&gt;{&lt;BR /&gt;Read_Successful = FALSE;&lt;BR /&gt;/* read */&lt;BR /&gt;data_read1 = *(FAR_DATA GLOBALADR tUI16*)address_test_gConst;&lt;BR /&gt;if(data_read1 == *(FAR_DATA GLOBALADR tUI16*)address_test_gConst)&lt;BR /&gt;{&lt;BR /&gt;Read_Successful = TRUE;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else if(Testcase_Num==2)&lt;BR /&gt;{&lt;BR /&gt;Write_Successful = FALSE;&lt;/P&gt;&lt;P&gt;/*write */&lt;BR /&gt;*(FAR_DATA GLOBALADR tUI16*)address_test_gConst =0x1234;&lt;BR /&gt;&lt;BR /&gt;if( *(FAR_DATA GLOBALADR tUI16*)address_test_gConst == 0x1234)&lt;BR /&gt;{&lt;BR /&gt;Write_Successful = TRUE;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else if(Testcase_Num==3)&lt;BR /&gt;{&lt;BR /&gt;Exe_Successful = FALSE;&lt;/P&gt;&lt;P&gt;*(FAR_DATA GLOBALADR tUI16*)address_test_gConst =0x0A00;&lt;BR /&gt;funct1_gConst();&lt;BR /&gt;Exe_Successful = TRUE;&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*Test code end*/&lt;/P&gt;&lt;P&gt;Please let know if you need more information from me .&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Krutika&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 09:43:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MPU-violation/m-p/2126313#M20630</guid>
      <dc:creator>KrutikaK</dc:creator>
      <dc:date>2025-07-01T09:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: MPU violation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MPU-violation/m-p/2126517#M20631</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;do you think that attached examples will help you to implement MPU?&lt;BR /&gt;&lt;BR /&gt;For more examples from my drawer please visit&amp;nbsp;&lt;A href="https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LAMA-s-S12XE-unofficial-examples/ta-p/1100774" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LAMA-s-S12XE-unofficial-examples/ta-p/1100774&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Ladislav&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 15:14:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/MPU-violation/m-p/2126517#M20631</guid>
      <dc:creator>lama</dc:creator>
      <dc:date>2025-07-01T15:14:40Z</dc:date>
    </item>
  </channel>
</rss>

