<?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: Can I write EV[n].CTL when counter is running? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763291#M30751</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For clarity, I summarise my original questions in more clear form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q1: Is it safe to write EV[n].CTL when associated counter is running?&lt;/P&gt;&lt;P&gt;Q2: Is it safe to write EV[n].STATE when associated counter is running?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, if answer is "not in general" , I have other set of more restricted questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q3: Is it safe to write EV[n].CTL when associated counter is running but it is known that EV[n] can't be triggered during&lt;/P&gt;&lt;P&gt;write operation assuming either previous or written value of EV[n].CTL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q4: Is it safe to write EV[n].STATE when associated counter is running but it is known that EV[n] can't be triggered during&lt;/P&gt;&lt;P&gt;write operation assuming either previous or written value of EV[n].STATE mask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q5: Is it safe to write EV[n].CTL when associated counter is running but EV[n] is disabled in current state by EV[n].STATE&lt;/P&gt;&lt;P&gt;and it is known that state can't change during write operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intuitively, answers to Q3-Q5 most probably to be "yes", but I'm not sure, because I heard about situations in which SCT behave counter-intuitively, and I not yet seen any examples using write to Ev[n].CTL or EV[n].STATE while counter is running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If answer of any quection above is "yes", I think it is worth to place it in documentation explicitly as usable feature of SCT, because they are enabling features for many applications.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Jan 2018 17:14:19 GMT</pubDate>
    <dc:creator>alexeyborisenko</dc:creator>
    <dc:date>2018-01-31T17:14:19Z</dc:date>
    <item>
      <title>Can I write EV[n].CTL when counter is running?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763287#M30747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wish to capture start-bits of UART transfers while counter continously running in modulo2^16 mode. Is It possible with SCT? How can i signal to SCT that I am read previously captured value and need to capture start-bit of next transfer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In UM10601, it is stated clearly that STATE and OUTPUT can be written ony when counter halted. But what about EV[n].CTL and EV[n].STATE? I need to keep timer permanently running without any stops and halts to allow precise measurements of time between any pair of captured events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand, with SCT, I will change state on capture event to prevent overwriting captured value by following transitions until end of transfer, and then i need some means to return to original state to allow capture of&amp;nbsp; next transfer.&lt;/P&gt;&lt;P&gt;I working with LPC812.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jan 2018 02:21:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763287#M30747</guid>
      <dc:creator>alexeyborisenko</dc:creator>
      <dc:date>2018-01-28T02:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write EV[n].CTL when counter is running?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763288#M30748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="312183" data-username="alexeyborisenko" href="https://community.nxp.com/people/alexeyborisenko"&gt;Alexey Borisenko&lt;/A&gt;,&lt;/P&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;To be honest, I'm not very clear with your question, so I'd highly recommend you to illustrate the application flow of SCTimer in details, then I can verify whether this application is feasible or not.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"&gt;&lt;SPAN style="font-family: 'Microsoft YaHei', STXihei; background-color: #ffffff;"&gt;I'm looking forward to your reply.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 02:34:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763288#M30748</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-01-31T02:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write EV[n].CTL when counter is running?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763289#M30749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Caprure event (ev[0]) will be enabled in state 0 only, and it always andvances to state 1, to disabling itself and avoid owerwriting of capture register until software responses to this event.&lt;/P&gt;&lt;P&gt;No events enabled after that in state 1, only software will decide when to return to state 0 to allow next capture.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strightwordward way of returning to state0 from software is writing 0 to SCT.STATE register, but it is not allowed&amp;nbsp; when counter is running. I'm trying to found best way to work-around this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let suppose using another event (EV[1]) to return from state1 to state0. How it may be triggered by software?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 1:&lt;/P&gt;&lt;P&gt;Make EV[1].CTRL condition always true but initially disabled by EV[1].STATE mask, and software can trigger it by writing enabling value to EV[1].STATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 2:&lt;/P&gt;&lt;P&gt;Make EV[1].CTRL condition initially always false, but changing it to true by writing EV[1].CTRL when software wish to trigger it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other options:&lt;/P&gt;&lt;P&gt;I know about options to feed triggering input to sct (to EV[1] in our case) through board-connected pair of external pins or by single pin using pullups, but those options are so ugly so I trying not thinking about them yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I'm described my questions clearly enough now.&lt;/P&gt;&lt;P&gt;Thanks for response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 14:11:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763289#M30749</guid>
      <dc:creator>alexeyborisenko</dc:creator>
      <dc:date>2018-01-31T14:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write EV[n].CTL when counter is running?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763290#M30750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And yet one option I found just now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Option 3:&lt;/P&gt;&lt;P&gt;Make both Ev[0] and Ev[1] triggering capure of same capure register and toggle state, but using different sct inputs, one of them connected by switch matrix to RxD and another to always-high input. Then software will toggle connection of RxD/always-high signals to sct inputs using switch matrix each time to allow new capture event.&lt;/P&gt;&lt;P&gt;But this option still slihgtly ugly: it seems to be less efficient in coding than options 1 or 2 and needs some pin to be useful as source of always-high signal, so original question remains actual.&lt;/P&gt;&lt;P&gt;If options 1 or 2 is ok, I prefer to use one of them.&lt;/P&gt;&lt;P&gt;And if anyone have other options, I will be glad to hear about them.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 15:23:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763290#M30750</guid>
      <dc:creator>alexeyborisenko</dc:creator>
      <dc:date>2018-01-31T15:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write EV[n].CTL when counter is running?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763291#M30751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For clarity, I summarise my original questions in more clear form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q1: Is it safe to write EV[n].CTL when associated counter is running?&lt;/P&gt;&lt;P&gt;Q2: Is it safe to write EV[n].STATE when associated counter is running?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And, if answer is "not in general" , I have other set of more restricted questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q3: Is it safe to write EV[n].CTL when associated counter is running but it is known that EV[n] can't be triggered during&lt;/P&gt;&lt;P&gt;write operation assuming either previous or written value of EV[n].CTL value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q4: Is it safe to write EV[n].STATE when associated counter is running but it is known that EV[n] can't be triggered during&lt;/P&gt;&lt;P&gt;write operation assuming either previous or written value of EV[n].STATE mask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q5: Is it safe to write EV[n].CTL when associated counter is running but EV[n] is disabled in current state by EV[n].STATE&lt;/P&gt;&lt;P&gt;and it is known that state can't change during write operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intuitively, answers to Q3-Q5 most probably to be "yes", but I'm not sure, because I heard about situations in which SCT behave counter-intuitively, and I not yet seen any examples using write to Ev[n].CTL or EV[n].STATE while counter is running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If answer of any quection above is "yes", I think it is worth to place it in documentation explicitly as usable feature of SCT, because they are enabling features for many applications.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 17:14:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763291#M30751</guid>
      <dc:creator>alexeyborisenko</dc:creator>
      <dc:date>2018-01-31T17:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can I write EV[n].CTL when counter is running?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763292#M30752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="312183" data-username="alexeyborisenko" href="https://community.nxp.com/people/alexeyborisenko"&gt;Alexey Borisenko&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;It's not safe to write these register when the counter is running, we'd highly recommend the customers to avoid these operations.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 08:27:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Can-I-write-EV-n-CTL-when-counter-is-running/m-p/763292#M30752</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2018-02-01T08:27:25Z</dc:date>
    </item>
  </channel>
</rss>

