<?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のトピックRe: How to do software-triggered interrupts for USART in LPC55S28?</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058752#M40956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Andy,&lt;/P&gt;&lt;P&gt;Yes, you are right, you can write the NVIC-&amp;gt;STIR=0xxx to generate interrupt for the IRQxx. BTW, you can write the NVIC pending register to trigger an interrupt. For example vector index of&amp;nbsp;Flexcomm Interface 0 is 14, you can write the following line to trigger an interrupt:&lt;/P&gt;&lt;P&gt;NVIC-&amp;gt;ISPR[0]|=1&amp;lt;&amp;lt;14;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Apr 2020 05:21:53 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2020-04-07T05:21:53Z</dc:date>
    <item>
      <title>How to do software-triggered interrupts for USART in LPC55S28?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058750#M40954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hola.&amp;nbsp;I'd like to use the age-old trick of using a software interrupt to kick off USART data transmission.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's the usual sort of thing. I have a software FIFO (not the USART's built-in FIFO, and not the ring buffer that is part of the USART driver) that holds data packets to transmit, and I have a flag indicating whether the transmitter is busy sending anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only place where this FIFO is popped is in the USART's ISR as triggered by a transmit-complete interrupt. In that ISR, I check to see if the FIFO has any packets to send. If so, the packet is popped and written to the transmitter, and the transmit-busy flag is set. If not, then the transmit-busy flag is cleared and nothing new is sent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outside of the interrupt context, after&amp;nbsp;a new packet is pushed to the FIFO, that routine checks to see if the transmitter is busy. If not, then it should trigger the USART's transmit-done interrupt to kick off the transmission. If the transmitter is already busy, then that doesn't happen as eventually there will be a TX-done interrupt which will pop the FIFO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see any obvious way to assert a software interrupt in the MCUXpresso SDK. Is such a function/feature buried elsewhere?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2020 03:21:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058750#M40954</guid>
      <dc:creator>devel</dc:creator>
      <dc:date>2020-04-06T03:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to do software-triggered interrupts for USART in LPC55S28?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058751#M40955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(replying to myself)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The NVIC has a register STIR which generates the interrupt for the interrupt number written for it. See page 34, section 3.4.26 of UM11126 rev 1.9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I suppose I can ask why there is no SDK function for this?&lt;/P&gt;&lt;DIV class="wayback1996-RTmodal" style="display: none;"&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV style="display: none;"&gt;&lt;/DIV&gt;&lt;BUTTON class="wayback1996-RTclose"&gt;×&lt;/BUTTON&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2020 23:00:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058751#M40955</guid>
      <dc:creator>devel</dc:creator>
      <dc:date>2020-04-06T23:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to do software-triggered interrupts for USART in LPC55S28?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058752#M40956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Andy,&lt;/P&gt;&lt;P&gt;Yes, you are right, you can write the NVIC-&amp;gt;STIR=0xxx to generate interrupt for the IRQxx. BTW, you can write the NVIC pending register to trigger an interrupt. For example vector index of&amp;nbsp;Flexcomm Interface 0 is 14, you can write the following line to trigger an interrupt:&lt;/P&gt;&lt;P&gt;NVIC-&amp;gt;ISPR[0]|=1&amp;lt;&amp;lt;14;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2020 05:21:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058752#M40956</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-04-07T05:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to do software-triggered interrupts for USART in LPC55S28?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058753#M40957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For what it's worth:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;xiangjun.rong wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi, Andy,&lt;/P&gt;&lt;P&gt;Yes, you are right, you can write the NVIC-&amp;gt;STIR=0xxx to generate interrupt for the IRQxx.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;works as expected. Writing to STIR invoked the desired interrupt. None of the interrupt-source status flags were asserted, which is also expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I set a global flag that the ISR could check to see if the interrupt was caused by the software trigger or by a FIFO level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;BTW, you can write the NVIC pending register to trigger an interrupt. For example vector index of&amp;nbsp;Flexcomm Interface 0 is 14, you can write the following line to trigger an interrupt:&lt;/P&gt;&lt;P&gt;NVIC-&amp;gt;ISPR[0]|=1&amp;lt;&amp;lt;14;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I am not sure of the difference! (I should probably study more how the NVIC works.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 23:45:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058753#M40957</guid>
      <dc:creator>devel</dc:creator>
      <dc:date>2020-04-13T23:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to do software-triggered interrupts for USART in LPC55S28?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058754#M40958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is NOT additional flag to indicate the interrupt is triggered by software or hardware, in general, all interrupts are triggered by hardware, the software trigger can be used in test or special purpose.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 06:49:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-do-software-triggered-interrupts-for-USART-in-LPC55S28/m-p/1058754#M40958</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2020-04-16T06:49:07Z</dc:date>
    </item>
  </channel>
</rss>

