<?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>Kinetis Motor SuiteのトピックRe: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
    <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815169#M642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Adam and Philip,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't use the debugger while in the system due to high positive and negative voltages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use the&amp;nbsp;RCM_GetStickyResetSources() command from fsl_rcm.h, however:&lt;/P&gt;&lt;P&gt;static inline uint32_t RCM_GetStickyResetSources(RCM_Type *base)&lt;BR /&gt;{&lt;BR /&gt;#if (defined(FSL_FEATURE_RCM_REG_WIDTH) &amp;amp;&amp;amp; (FSL_FEATURE_RCM_REG_WIDTH == 32))&lt;BR /&gt; return base-&amp;gt;SSRS;&lt;BR /&gt;#else&lt;BR /&gt; return (base-&amp;gt;SSRS0 | ((uint32_t)base-&amp;gt;SSRS1 &amp;lt;&amp;lt; 8U));&lt;BR /&gt;#endif /* (FSL_FEATURE_RCM_REG_WIDTH == 32) */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First I wanted to see what the SRSS bits return in Normal Reset Cases:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This to me looks like SSRS0 is stored in bits 0-7, and SSRS1 is stored in bits 8-15.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a normal reset using the NVIC_SystemReset() Command I see:&amp;nbsp;&lt;/P&gt;&lt;P&gt;0x00000400 is the value returned by this function, which corresponds to bit 2 in SSRS1:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67758i660E6BB017B0FAD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Which makes sense since NVIC_SystemReset() sets the&amp;nbsp;SYSYRESETREQ bit in the MCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I hang the slow or fast thread, and let my watchdog reset the MCU, this register returns 0x00000040. This is bit 6 in SSRS0, which indicates that the reset was caused by the System Reset been being driven low, which makes since:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67709i7FCCCC666191FEAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like powering off the MCU causes 0x00000082 to be set in SRSS0 which corresponds to reset caused by low voltage:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67921i688D3814699BF948/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67793iD2FF96F9D4D5C13F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It also looks like powering off the MCU clears the previous SRSS bits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm going to duplicate the reset to see what happens. I think it will just tell me the watchdog reset the MCU because the software thread hung. It did look like the high estimator bandwidth caused the software to hang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2018 14:47:48 GMT</pubDate>
    <dc:creator>derekcook</dc:creator>
    <dc:date>2018-08-29T14:47:48Z</dc:date>
    <item>
      <title>High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815162#M635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran across this problem in my testing of the sensorless motor control. I have the minumum startup current set to 100% of rated (which is 150A - I need this to always be 150A so I can start at high loads), I have my estimator bandwidth set to 76Hz, my inertia is 0.0672 A /RPM/s, and the load on my motor is at 70 Nm. When the bandwidth is set to 76Hz with the high inertia and high load, the software hangs. This causes a reboot on my system, because the software quits petting the watchdog.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I lower the Estimator Bandwidth below 30 Hz the&amp;nbsp;software hang goes away. All of the other settings and loads remain the same. Any idea why the high bandwidth would cause the software to hang?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 19:59:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815162#M635</guid>
      <dc:creator>derekcook</dc:creator>
      <dc:date>2018-08-22T19:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815163#M636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The hang seems to happen after the startup block. It seems to happen in the transfer between startup and estimator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2018 20:02:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815163#M636</guid>
      <dc:creator>derekcook</dc:creator>
      <dc:date>2018-08-22T20:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815164#M637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess is that with the high bandwidth on the estimator, at the transition from open-loop to closed-loop there is a large amount of current draw and the processor browns out. You would need to look at the SSRS registers to know exactly why the processor reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That being said, given the large inertia of your application, do you see an issue with the lower estimator bandwidth?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 00:47:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815164#M637</guid>
      <dc:creator>linestream-adam</dc:creator>
      <dc:date>2018-08-23T00:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815165#M638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I look at the SSRS registers? I can take a look at that. I do not see an issue with the lower bandwidth. The control works just fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 12:28:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815165#M638</guid>
      <dc:creator>derekcook</dc:creator>
      <dc:date>2018-08-23T12:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815166#M639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look at the mcu datasheet. That should give you the address of those registers. From there you could save them into a variable or read them with your debugger after the brown-out event.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 12:54:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815166#M639</guid>
      <dc:creator>linestream-adam</dc:creator>
      <dc:date>2018-08-23T12:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815167#M640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the MCU reference manual details the reset states.&amp;nbsp; The registers are RCM_SRS0 and RCM_SRS1 - which are in the Reset Control Module. In the MCUXpresso IDE you can choose peripherals, choose the RCM and then look at the registers after a pause.&amp;nbsp; The SRS bits reflect what caused the last reset.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="kv31_RCM_SRS0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67527iABC108E4B08DCC01/image-size/large?v=v2&amp;amp;px=999" role="button" title="kv31_RCM_SRS0.png" alt="kv31_RCM_SRS0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="kv31_RCM_SRS1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67571iDC6214BB8D42A512/image-size/large?v=v2&amp;amp;px=999" role="button" title="kv31_RCM_SRS1.png" alt="kv31_RCM_SRS1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Philip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 16:02:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815167#M640</guid>
      <dc:creator>philip_drake</dc:creator>
      <dc:date>2018-08-23T16:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815168#M641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help, and pointing out these registers in the MCU datasheet. Since the issue cleared with the lower bandwidth we moved on&amp;nbsp;to other aspects of software testing for now, but I will increase the bandwidth again once we test some more aspects of the software, and check the SRSS register to see what caused the reset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2018 20:07:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815168#M641</guid>
      <dc:creator>derekcook</dc:creator>
      <dc:date>2018-08-23T20:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815169#M642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Adam and Philip,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't use the debugger while in the system due to high positive and negative voltages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use the&amp;nbsp;RCM_GetStickyResetSources() command from fsl_rcm.h, however:&lt;/P&gt;&lt;P&gt;static inline uint32_t RCM_GetStickyResetSources(RCM_Type *base)&lt;BR /&gt;{&lt;BR /&gt;#if (defined(FSL_FEATURE_RCM_REG_WIDTH) &amp;amp;&amp;amp; (FSL_FEATURE_RCM_REG_WIDTH == 32))&lt;BR /&gt; return base-&amp;gt;SSRS;&lt;BR /&gt;#else&lt;BR /&gt; return (base-&amp;gt;SSRS0 | ((uint32_t)base-&amp;gt;SSRS1 &amp;lt;&amp;lt; 8U));&lt;BR /&gt;#endif /* (FSL_FEATURE_RCM_REG_WIDTH == 32) */&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First I wanted to see what the SRSS bits return in Normal Reset Cases:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This to me looks like SSRS0 is stored in bits 0-7, and SSRS1 is stored in bits 8-15.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a normal reset using the NVIC_SystemReset() Command I see:&amp;nbsp;&lt;/P&gt;&lt;P&gt;0x00000400 is the value returned by this function, which corresponds to bit 2 in SSRS1:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67758i660E6BB017B0FAD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Which makes sense since NVIC_SystemReset() sets the&amp;nbsp;SYSYRESETREQ bit in the MCU.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I hang the slow or fast thread, and let my watchdog reset the MCU, this register returns 0x00000040. This is bit 6 in SSRS0, which indicates that the reset was caused by the System Reset been being driven low, which makes since:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67709i7FCCCC666191FEAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like powering off the MCU causes 0x00000082 to be set in SRSS0 which corresponds to reset caused by low voltage:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67921i688D3814699BF948/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/67793iD2FF96F9D4D5C13F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_4.png" alt="pastedImage_4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It also looks like powering off the MCU clears the previous SRSS bits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I'm going to duplicate the reset to see what happens. I think it will just tell me the watchdog reset the MCU because the software thread hung. It did look like the high estimator bandwidth caused the software to hang&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2018 14:47:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815169#M642</guid>
      <dc:creator>derekcook</dc:creator>
      <dc:date>2018-08-29T14:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: High Estimator Bandwidth During High Load and Inertia Causes Software Hang</title>
      <link>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815170#M643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Derek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would be surprised if the watchdog ends up being the issue. There should be no correlation between high estimator bandwidth and CPU usage.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2018 00:00:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Motor-Suite/High-Estimator-Bandwidth-During-High-Load-and-Inertia-Causes/m-p/815170#M643</guid>
      <dc:creator>linestream-adam</dc:creator>
      <dc:date>2018-08-30T00:00:29Z</dc:date>
    </item>
  </channel>
</rss>

