<?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 EmbSys Register addresses are wrong after compilation in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/EmbSys-Register-addresses-are-wrong-after-compilation/m-p/1238243#M7293</link>
    <description>&lt;P&gt;Hello all!&lt;BR /&gt;&lt;BR /&gt;I am running S32DS Power 2.1 version, on a MPC5744P Z4 devboard.&lt;BR /&gt;While using the FlexPWM, I have noticed, with the help of the debugger, that the register addresses to which the code writes are wrong. For instance, when I try to write to CTRL1, it writes to CTRL2 instead. Or when I try to write to CTRL2, it writes to CTRL1 instead. Or even when I try to write to OUTEN, it writes to the register immediately next to it, MASK.&lt;BR /&gt;&lt;BR /&gt;For some time this drove me insane, how could such simple code not work, until I used the EmbSys Registers debugger (kudos to that. it is&amp;nbsp;&lt;STRONG&gt;extremely useful&lt;/STRONG&gt;).&lt;BR /&gt;&lt;BR /&gt;Another problem is within the registers themselves. I noticed that in the FlexPWM reigsters, the bit positions are flipped, as in bit 0 is actually 15, bit 1 is actually 14, and so on. In the following image compare what is written on the Reference Manual, and what the EmbSys viewer shows. However, upon inspection of MPC5744P.h, everything looks file.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-03-02 00_00_25-MPC5744PRM.pdf - [MPC5744P, MPC5744P Reference Manual] - SumatraPDF.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138387i0682922DCEA1523B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-02 00_00_25-MPC5744PRM.pdf - [MPC5744P, MPC5744P Reference Manual] - SumatraPDF.png" alt="2021-03-02 00_00_25-MPC5744PRM.pdf - [MPC5744P, MPC5744P Reference Manual] - SumatraPDF.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-03-02 00_00_10-workspaceS32DS.Power.2.1 - Debug - FirstProject_src_ExtLed.c - S32 Design Studio.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138386i1C08B2FC53233B5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-02 00_00_10-workspaceS32DS.Power.2.1 - Debug - FirstProject_src_ExtLed.c - S32 Design Studio.png" alt="2021-03-02 00_00_10-workspaceS32DS.Power.2.1 - Debug - FirstProject_src_ExtLed.c - S32 Design Studio.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Mar 2021 23:01:08 GMT</pubDate>
    <dc:creator>kagoshi</dc:creator>
    <dc:date>2021-03-01T23:01:08Z</dc:date>
    <item>
      <title>EmbSys Register addresses are wrong after compilation</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/EmbSys-Register-addresses-are-wrong-after-compilation/m-p/1238243#M7293</link>
      <description>&lt;P&gt;Hello all!&lt;BR /&gt;&lt;BR /&gt;I am running S32DS Power 2.1 version, on a MPC5744P Z4 devboard.&lt;BR /&gt;While using the FlexPWM, I have noticed, with the help of the debugger, that the register addresses to which the code writes are wrong. For instance, when I try to write to CTRL1, it writes to CTRL2 instead. Or when I try to write to CTRL2, it writes to CTRL1 instead. Or even when I try to write to OUTEN, it writes to the register immediately next to it, MASK.&lt;BR /&gt;&lt;BR /&gt;For some time this drove me insane, how could such simple code not work, until I used the EmbSys Registers debugger (kudos to that. it is&amp;nbsp;&lt;STRONG&gt;extremely useful&lt;/STRONG&gt;).&lt;BR /&gt;&lt;BR /&gt;Another problem is within the registers themselves. I noticed that in the FlexPWM reigsters, the bit positions are flipped, as in bit 0 is actually 15, bit 1 is actually 14, and so on. In the following image compare what is written on the Reference Manual, and what the EmbSys viewer shows. However, upon inspection of MPC5744P.h, everything looks file.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-03-02 00_00_25-MPC5744PRM.pdf - [MPC5744P, MPC5744P Reference Manual] - SumatraPDF.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138387i0682922DCEA1523B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-02 00_00_25-MPC5744PRM.pdf - [MPC5744P, MPC5744P Reference Manual] - SumatraPDF.png" alt="2021-03-02 00_00_25-MPC5744PRM.pdf - [MPC5744P, MPC5744P Reference Manual] - SumatraPDF.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-03-02 00_00_10-workspaceS32DS.Power.2.1 - Debug - FirstProject_src_ExtLed.c - S32 Design Studio.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/138386i1C08B2FC53233B5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-02 00_00_10-workspaceS32DS.Power.2.1 - Debug - FirstProject_src_ExtLed.c - S32 Design Studio.png" alt="2021-03-02 00_00_10-workspaceS32DS.Power.2.1 - Debug - FirstProject_src_ExtLed.c - S32 Design Studio.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 23:01:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/EmbSys-Register-addresses-are-wrong-after-compilation/m-p/1238243#M7293</guid>
      <dc:creator>kagoshi</dc:creator>
      <dc:date>2021-03-01T23:01:08Z</dc:date>
    </item>
  </channel>
</rss>

