<?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: s32k396 resolver angle flips by pi after power cycling in S32K</title>
    <link>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2307729#M56586</link>
    <description>I checked my setting. The SWG acceptance window is +/-15%. It is maybe unnecessarily too wide. The excitation adaptation I-controller does not make such a change in one step.&lt;BR /&gt;&lt;BR /&gt;    /* Exit power down mode */&lt;BR /&gt;    REG_BIT_CLEAR32(SGEN_Addr, SGEN_CTRL_PDS_MASK &amp;lt;&amp;lt; SGEN_CTRL_PDS_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Wait for load output freq */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_WAVE_FREQ_WAIT &amp;lt;&amp;lt; SGEN_CTRL_LDOS_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Amplitude CFG */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_IO_WAVE_AMPLITUDE &amp;lt;&amp;lt; SGEN_CTRL_IOAMPL_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Phase aligenment acceptance window width */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_PHA_ALIG_ACCEPT_WIN_15 &amp;lt;&amp;lt; SGEN_CTRL_WINDOW_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Error Interrupt Off */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_ERROR_INTERRUPT_OFF &amp;lt;&amp;lt; SGEN_CTRL_SEMASK_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Trigger mode selection */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_IN_PHA_ALIG_TRIG_HW &amp;lt;&amp;lt; SGEN_CTRL_TRIG_MODE_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Output wave frequency configuration */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_OUTPUT_FREQENCY &amp;lt;&amp;lt; SGEN_CTRL_IOFREQ_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* loaded output freq */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_WAVE_FREQ_LOAD &amp;lt;&amp;lt; SGEN_CTRL_LDOS_SHIFT);</description>
    <pubDate>Wed, 04 Feb 2026 12:58:23 GMT</pubDate>
    <dc:creator>MilanBrejl</dc:creator>
    <dc:date>2026-02-04T12:58:23Z</dc:date>
    <item>
      <title>s32k396 resolver angle flips by pi after power cycling</title>
      <link>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2303365#M56480</link>
      <description>&lt;P&gt;hello nxp experts..&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm using an EB Tresos based proj with sw resolver but some weird behavior occurs when the power is recycled: at certain angles, the next power up would produce an angle that is 180deg apart.&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i've checked: the sine/cos waveforms vs the excitation are the same before and after the power recycle. the amplitude of the differential sine/cosine signals are 1.5V amplitude. i have a x4 in the SDADC user gain setting.&lt;/P&gt;&lt;P&gt;what i cannot figure out: 1. how is the SWG as the excitation is synchronized with the SDADC ? i cannot seem to find the triggering mechanism. 2. how is the etpu synchronized with the SDADC? 3. i cannot find where in the eb tresos to set the SDADC to differential mode.. is it hidden or by default?&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your attention&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 04:25:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2303365#M56480</guid>
      <dc:creator>gzleng</dc:creator>
      <dc:date>2026-01-30T04:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: s32k396 resolver angle flips by pi after power cycling</title>
      <link>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2305351#M56560</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/199258"&gt;@gzleng&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;try to modify the Start Delay parameter. Set it to 1/4 of the excitation signal period, or 1/2 of the excitation signal period. This parameter sets the initial phase shift of the excitation signals. A proper settings enables to speed up the RDC start-up sequence by quick settle of excitation signal phase-shift adjustment. Wrong settings might cause what you see - that it sometimes settles to 0deg and sometimes to 180deg.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MilanBrejl_0-1770124611561.png" style="width: 580px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/375313i8DE67B12C2EB8F24/image-dimensions/580x248?v=v2" width="580" height="248" role="button" title="MilanBrejl_0-1770124611561.png" alt="MilanBrejl_0-1770124611561.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1. how is the SWG as the excitation is synchronized with the SDADC ? i cannot seem to find the triggering mechanism.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SDADC runs continuously. There is no way to trigger/adjust the sampling points. SDADC samples arrives to eTPU as buffers of 16+16 samples. We need that one period of a modulated signal fits perfectly into that buffer of 16+16 samples. &lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;It is achieved the way, that the excitation signal is phase-shifted (delayed). The phase-shift is controlled by a slow PI controller (actually just I-controller).&amp;nbsp; The error input to the controller is the zero-crossing error of sin/cos signals in the input buffers. When settled, the excitation signal delay is tuned, sin/cos input signals are aligned in the buffers, their samples number 0 and 16 are all zeros.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. how is the etpu synchronized with the SDADC? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;16 samples ready in SDADC output buffer -&amp;gt; DMA triggered -&amp;gt; DMA moves those samples to eTPU DATA RAM &amp;amp; links another DMA channel -&amp;gt; that DMA channel transfers a constant value from RAM to eTPU channel HSR -&amp;gt; a write to HSR evokes eTPU event -&amp;gt; eTPU processes the SDADC samples and updates resolver angle and speed.&lt;BR /&gt;This happens every 50usec&amp;nbsp;@ 10kHz excitation. There are also faster configurations.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(simplified - DSPSS omitted, talking about just one SDADC signal instead of both sin &amp;amp; cos)&lt;BR /&gt;This way the processing of resolver angle is completely independent of the CPU. Not a single interrupt to the CPU.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;3. i cannot find where in the eb tresos to set the SDADC to differential mode.. is it hidden or by default?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;EB tresos: Adc-&amp;gt;AdcHwUnit-&amp;gt;AdcChannel&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MilanBrejl_1-1770125207385.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/375316i8B13A1622E3C5C5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MilanBrejl_1-1770125207385.png" alt="MilanBrejl_1-1770125207385.png" /&gt;&lt;/span&gt;&lt;BR /&gt;This example uses differential signal between AN0 and AN1 inputs as the input to ADC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2026 13:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2305351#M56560</guid>
      <dc:creator>MilanBrejl</dc:creator>
      <dc:date>2026-02-03T13:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: s32k396 resolver angle flips by pi after power cycling</title>
      <link>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2305458#M56563</link>
      <description>&lt;P&gt;thank you Milan, that explains well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;related to the synchronization: Sinewave gen is not in the EB or RTD, i see there is an option for SWG_PHA_ALIG_ACCEPT_WIN_xx register. does it play a role in the sampling process?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Feb 2026 17:21:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2305458#M56563</guid>
      <dc:creator>gzleng</dc:creator>
      <dc:date>2026-02-03T17:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: s32k396 resolver angle flips by pi after power cycling</title>
      <link>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2307729#M56586</link>
      <description>I checked my setting. The SWG acceptance window is +/-15%. It is maybe unnecessarily too wide. The excitation adaptation I-controller does not make such a change in one step.&lt;BR /&gt;&lt;BR /&gt;    /* Exit power down mode */&lt;BR /&gt;    REG_BIT_CLEAR32(SGEN_Addr, SGEN_CTRL_PDS_MASK &amp;lt;&amp;lt; SGEN_CTRL_PDS_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Wait for load output freq */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_WAVE_FREQ_WAIT &amp;lt;&amp;lt; SGEN_CTRL_LDOS_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Amplitude CFG */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_IO_WAVE_AMPLITUDE &amp;lt;&amp;lt; SGEN_CTRL_IOAMPL_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Phase aligenment acceptance window width */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_PHA_ALIG_ACCEPT_WIN_15 &amp;lt;&amp;lt; SGEN_CTRL_WINDOW_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Error Interrupt Off */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_ERROR_INTERRUPT_OFF &amp;lt;&amp;lt; SGEN_CTRL_SEMASK_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Trigger mode selection */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_IN_PHA_ALIG_TRIG_HW &amp;lt;&amp;lt; SGEN_CTRL_TRIG_MODE_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* Output wave frequency configuration */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_OUTPUT_FREQENCY &amp;lt;&amp;lt; SGEN_CTRL_IOFREQ_SHIFT);&lt;BR /&gt;&lt;BR /&gt;    /* loaded output freq */&lt;BR /&gt;    REG_BIT_SET32(SGEN_Addr, SGEN_WAVE_FREQ_LOAD &amp;lt;&amp;lt; SGEN_CTRL_LDOS_SHIFT);</description>
      <pubDate>Wed, 04 Feb 2026 12:58:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/s32k396-resolver-angle-flips-by-pi-after-power-cycling/m-p/2307729#M56586</guid>
      <dc:creator>MilanBrejl</dc:creator>
      <dc:date>2026-02-04T12:58:23Z</dc:date>
    </item>
  </channel>
</rss>

