<?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>MPC5xxxのトピックRe: MPC5777C CSE Problem</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589107#M4239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;False alarm everyone; nothing to see here.&amp;nbsp; It turns out that MULTI was optimizing away some important variables there (namely, 'final') because they were local variables and were not directly reference later in the program.&amp;nbsp; Making these variables global fixed everything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Aug 2016 17:32:58 GMT</pubDate>
    <dc:creator>jeffcampbell</dc:creator>
    <dc:date>2016-08-15T17:32:58Z</dc:date>
    <item>
      <title>MPC5777C CSE Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589105#M4237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I'm back again.&amp;nbsp; I think I've messed up my CSE - directly from the system reset, it has an error code 0x13 (error reading, programming, or erasing one of the CSE flash blocks).&amp;nbsp; I decided to try and follow the instructions for resetting its flash space, but these involve working through the CSE itself, and any CSE commands I issue are ignored and it throws a 0x02 error code (command sequence error).&amp;nbsp; No combination of CANCEL and INIT_CSE commands worked.&amp;nbsp; CANCEL is the only command the CSE will accept without throwing that 0x02 error.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried looking through AN4234, but a lot of details seem to be outdated for the MPC5777C.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts as to what might be wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 18:19:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589105#M4237</guid>
      <dc:creator>jeffcampbell</dc:creator>
      <dc:date>2016-08-10T18:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C CSE Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589106#M4238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is starting to get extremely confusing.&amp;nbsp; I've switched to a fresh MPC5777C and started over, but I'm completely failing to get results out of it.&amp;nbsp; I've listed the code I've tried below.&amp;nbsp; The CSE is displaying inconsistent behavior and most of the time ignoring commands and not throwing error codes about them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;ramkey&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier;"&gt;myMsg&lt;/SPAN&gt; are 128-bit arrays initialized beforehand.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cipher&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier;"&gt;final&lt;/SPAN&gt; are empty 128-bit arrays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; /* Load RAM key */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P1.R = (uint32_t)ramkey;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.CMD.R = 0x08u;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; waitCSE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Encrypt message */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P1.R = 0xeu;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P2.R = 1u;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P3.R = (uint32_t)myMsg;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P4.R = (uint32_t)cipher;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.CMD.R = 1u;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; waitCSE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Decrypt message */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P1.R = 0xeu;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P2.R = 1u;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P3.R = (uint32_t)cipher;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.P4.R = (uint32_t)final;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CSE.CMD.R = 3u;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; waitCSE();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;waitCSE() is a stub function that just loops until the SR.BSY bit goes low.&amp;nbsp; Here's one sequence of events that demonstrates what I'm trying to get at.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I tried including the INIT command, but it gave an error code (0x2) for issuing an INIT after a secure boot or other initialization.&amp;nbsp; This makes sense because the device is configured to try a secure boot.&amp;nbsp; With this INIT command present, the encrypt and decrypt commands did not work.&lt;/LI&gt;&lt;LI&gt;I removed the INIT command.&amp;nbsp; The encrypt command failed, but the decrypt command executed and apparently "decrypted" the empty result from the encryption command.&lt;/LI&gt;&lt;LI&gt;I made various changes that had nothing to do with the CSE (e.g. I modified some DCF records for the secure boot but there was no net change in the configuration).&amp;nbsp; Now the encrypt command processes 64 bits of the message and the decrypt command does nothing.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm completely at a loss for what I'm missing; I'm doing nothing different from earlier successful experiments.&amp;nbsp; What could be causing this behavior?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 14:12:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589106#M4238</guid>
      <dc:creator>jeffcampbell</dc:creator>
      <dc:date>2016-08-15T14:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C CSE Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589107#M4239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;False alarm everyone; nothing to see here.&amp;nbsp; It turns out that MULTI was optimizing away some important variables there (namely, 'final') because they were local variables and were not directly reference later in the program.&amp;nbsp; Making these variables global fixed everything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 17:32:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589107#M4239</guid>
      <dc:creator>jeffcampbell</dc:creator>
      <dc:date>2016-08-15T17:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5777C CSE Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589108#M4240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Jeff:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; now i meet the same issue. when i completed erasing all keys, in debug mode, I see that the CSE set CSE_SR_IDB that indicated it has erased all keys, but after i reprogram the flash, it directly return a 0x13 error code, which confused me much.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;as you describe "&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Making these variables global fixed everything.&lt;/SPAN&gt;", can you specify the local variables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2018 14:36:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5777C-CSE-Problem/m-p/589108#M4240</guid>
      <dc:creator>tong_zhou</dc:creator>
      <dc:date>2018-12-19T14:36:30Z</dc:date>
    </item>
  </channel>
</rss>

