<?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>LPC MicrocontrollersのトピックSCT halt problem in split mode with different prescalers?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566282#M17264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Sun Nov 16 12:25:28 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to program beep() functionality with CPU in sleep mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I planned the following: SCT lower 16bits ("SCT-L"): frequency generator, SCT upper bits ("SCT-H") duration. The output CTOUT0 always has to end with level LOW. Due to the limited range of the match registers, SCT-H runs at a lower frequency to get reasonable durations. For frequency generation I use 1us cycle time, for duration 20us. CTOUT1 is used as communication between SCT-L and SCT-H.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The whole beep runs from the SCT alone without CPU intervention as follows (no sleep mode used so far):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when calling beep(), CTOUT1 is set to 0 (active) and both SCT-L and SCT-H cleared and started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SCT-H has one match (event EV_END), that causes CTOUT1 to be set and SCT-H stopped.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SCT-L toggles CTOUT0 using mathes at value 0 (clear CTOUT0) ("EV_L"/"EV_HALT") and t/2 (set CTOUT0) ("EV_H") and a bidirectional counter. EV_HALT is configured to HALT [color=#f00]both[/color] SCT-L and SCT-H besides clearing CTOUT0. EV-HALT happens at match value 0, if CTOUT1=1. EV-L at the same match, if CTOUT1=0 (active) and only&amp;nbsp; clears CTOUT0. EV_H sets CTOUT0 and reverses counting direction (limit event).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The observation is: SCT-H ist NOT halted by EV_HALT (SCT.CTRL.HALT_H not set).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay, it's stopped already, but I wanted the SCT.CTRL.HALT_H as the single authoritive value indicating, that the next beep can be started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume, it's because of the different clocks/prescalers. Some kind of synchronization problem. But that synchronization is exactly what I'm after ;) Has anybody experienced a similar problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can do a workaround (halting SCT-H in the first place, later checking for both HALT flags). What is the expected behaviour?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SCT documentation does not clarify this situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: uC: LPC812, later LPC810.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:09:32 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:09:32Z</dc:date>
    <item>
      <title>SCT halt problem in split mode with different prescalers?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566282#M17264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by MarcVonWindscooting on Sun Nov 16 12:25:28 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to program beep() functionality with CPU in sleep mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I planned the following: SCT lower 16bits ("SCT-L"): frequency generator, SCT upper bits ("SCT-H") duration. The output CTOUT0 always has to end with level LOW. Due to the limited range of the match registers, SCT-H runs at a lower frequency to get reasonable durations. For frequency generation I use 1us cycle time, for duration 20us. CTOUT1 is used as communication between SCT-L and SCT-H.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The whole beep runs from the SCT alone without CPU intervention as follows (no sleep mode used so far):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when calling beep(), CTOUT1 is set to 0 (active) and both SCT-L and SCT-H cleared and started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SCT-H has one match (event EV_END), that causes CTOUT1 to be set and SCT-H stopped.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SCT-L toggles CTOUT0 using mathes at value 0 (clear CTOUT0) ("EV_L"/"EV_HALT") and t/2 (set CTOUT0) ("EV_H") and a bidirectional counter. EV_HALT is configured to HALT [color=#f00]both[/color] SCT-L and SCT-H besides clearing CTOUT0. EV-HALT happens at match value 0, if CTOUT1=1. EV-L at the same match, if CTOUT1=0 (active) and only&amp;nbsp; clears CTOUT0. EV_H sets CTOUT0 and reverses counting direction (limit event).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The observation is: SCT-H ist NOT halted by EV_HALT (SCT.CTRL.HALT_H not set).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Okay, it's stopped already, but I wanted the SCT.CTRL.HALT_H as the single authoritive value indicating, that the next beep can be started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I assume, it's because of the different clocks/prescalers. Some kind of synchronization problem. But that synchronization is exactly what I'm after ;) Has anybody experienced a similar problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can do a workaround (halting SCT-H in the first place, later checking for both HALT flags). What is the expected behaviour?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The SCT documentation does not clarify this situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: uC: LPC812, later LPC810.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:09:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566282#M17264</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: SCT halt problem in split mode with different prescalers?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566283#M17265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by uratan on Tue Dec 23 07:13:45 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;(continued from here)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fforum%2Fsct-it-very-difficult-function-sct-what-i-want" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/forum/sct-it-very-difficult-function-sct-what-i-want&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To: MarcVonWindscooting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As you see, it is simply because the SCT has no behavior to HALT while STOPped, I think.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope NXP, too, to take a little more care about documents...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;(Because the peripherals are very interesting like: &lt;/SPAN&gt;&lt;A href="http://http://aid.her.jp/uratan/led/tricks.html"&gt;"misc logic signal tricks by LPC810"&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:09:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566283#M17265</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: SCT halt problem in split mode with different prescalers?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566284#M17266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DF9DQ on Thu Dec 25 15:11:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that this observation (an event cannot HALT a counter if it is STOPped) is true only for 'older' SCT implementations in LPC81x and LPC43xx/LPC18xx.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will find that on the LPC82x, for instance, it works as you expected.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:09:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566284#M17266</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: SCT halt problem in split mode with different prescalers?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566285#M17267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by larryvc on Thu Dec 25 20:36:01 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: uratan&lt;/STRONG&gt;&lt;BR /&gt;(Because the peripherals are very interesting like: &lt;A href="http://http://aid.her.jp/uratan/led/tricks.html"&gt;"misc logic signal tricks by LPC810"&lt;/A&gt;)&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Nice work uratan!&amp;nbsp; But why did you use octal?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:09:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SCT-halt-problem-in-split-mode-with-different-prescalers/m-p/566285#M17267</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:09:34Z</dc:date>
    </item>
  </channel>
</rss>

