<?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: MCUXpresso - Help to initialize EINT2</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-Help-to-initialize-EINT2/m-p/700160#M28194</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks i will read it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Sep 2017 16:37:39 GMT</pubDate>
    <dc:creator>andreyshtyrya</dc:creator>
    <dc:date>2017-09-15T16:37:39Z</dc:date>
    <item>
      <title>MCUXpresso - Help to initialize EINT2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-Help-to-initialize-EINT2/m-p/700158#M28192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello! Im new with MCUXpresso, just starting to program mcu in C, before i always worked in assembler. Im trying to make a program witn lpc1769 with the OM13000 board to change the frecuency of blinking led when the interrupt on a pin is triggered, pin 2.12 falling edge. Build goes ok but it never enters IRQ rutine. Can please someone check the if&amp;nbsp;&lt;STRONG&gt;EINT2_IRQ &lt;/STRONG&gt;init or rutine is okey??? The only work the irq should do is to change frec value.&amp;nbsp;&amp;nbsp;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;===============================================================================&lt;BR /&gt; Name : gpio.c&lt;BR /&gt; Author : $(author)&lt;BR /&gt; Version :&lt;BR /&gt; Copyright : $(copyright)&lt;BR /&gt; Description : cambiar frecuencia de parapdeo del led con un pulsador por interrupcion&lt;BR /&gt;===============================================================================&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;#if defined (__USE_LPCOPEN)&lt;BR /&gt;#if defined(NO_BOARD_LIB)&lt;BR /&gt;#include "chip.h"&lt;BR /&gt;#else&lt;BR /&gt;#include "board.h"&lt;BR /&gt;#endif&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;#include &amp;lt;cr_section_macros.h&amp;gt;&lt;/P&gt;&lt;P&gt;#include "FreeRTOS.h"&lt;BR /&gt;#include "task.h"&lt;BR /&gt;#include "semphr.h"&lt;BR /&gt;#include "queue.h"&lt;/P&gt;&lt;P&gt;xSemaphoreHandle xSemaforo; // Tiene que ser Global, porque lo tiene que poder ver todas las tareas&lt;BR /&gt;int boton=0; //variable global del boton en pin 53&lt;/P&gt;&lt;P&gt;int frec=100; //tiempo de semiciclo de parpadeo en ms&lt;/P&gt;&lt;P&gt;void static taskLEDoff (void)&lt;BR /&gt;{&lt;BR /&gt; while(1)&lt;BR /&gt; {&lt;BR /&gt; xSemaphoreTake(xSemaforo,portMAX_DELAY);&lt;BR /&gt; Chip_GPIO_WritePortBit(LPC_GPIO,0,22,0); //apago con 0&lt;BR /&gt; vTaskDelay(frec/portTICK_RATE_MS); //tiempo off en 100ms&lt;BR /&gt; xSemaphoreGive(xSemaforo);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void static taskLEDon (void)&lt;BR /&gt;{&lt;BR /&gt; while(1)&lt;BR /&gt; {&lt;BR /&gt; xSemaphoreTake(xSemaforo,portMAX_DELAY);&lt;BR /&gt; Chip_GPIO_WritePortBit(LPC_GPIO,0,22,1); //enciendo con 1&lt;BR /&gt; vTaskDelay(frec/portTICK_RATE_MS); //tiempo on en 100ms&lt;BR /&gt; xSemaphoreGive(xSemaforo);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//RUTINA DE INTERRUPCION&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;void EINT2_IRQHandler()&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; NVIC_DisableIRQ(EINT2_IRQn); //desactivo interrupcion&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Chip_GPIOINT_ClearIntStatus(LPC_GPIOINT,GPIOINT_PORT2,12); //limpio IRQ&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; NVIC_ClearPendingIRQ(EINT2_IRQn);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;frec=500;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NVIC_EnableIRQ(EINT2_IRQn); //hablito IRQ de vuelta&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;int main (void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; SystemCoreClockUpdate();&lt;BR /&gt; Board_Init();&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//INICIALIZACION INTERRUPCION&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Chip_GPIO_SetPinDIRInput(LPC_GPIO,2,12); //pin como entrada&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Chip_GPIOINT_Init(LPC_GPIOINT); //inicializacion IRQ&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; Chip_GPIOINT_SetIntFalling(LPC_GPIOINT,GPIOINT_PORT2,12); //2.12 IRQ por flanco negativo&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; NVIC_EnableIRQ(EINT2_IRQn); //habilito IRQ en 2.12 EINT2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; xTaskCreate(taskLEDoff,"taskLEDoff",1024,0,1,0);&lt;BR /&gt; xTaskCreate(taskLEDon,"taskLEDon",1024,0,1,0);&lt;BR /&gt; xSemaforo = xSemaphoreCreateMutex();&lt;/P&gt;&lt;P&gt;vTaskStartScheduler();&lt;/P&gt;&lt;P&gt;while(1);&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 15:54:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-Help-to-initialize-EINT2/m-p/700158#M28192</guid>
      <dc:creator>andreyshtyrya</dc:creator>
      <dc:date>2017-09-11T15:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso - Help to initialize EINT2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-Help-to-initialize-EINT2/m-p/700159#M28193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="304546" data-username="andreyshtyrya" href="https://community.nxp.com/people/andreyshtyrya"&gt;Andrey Shtyrya&lt;/A&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Please refer to periph_pinint demo in the lpcopen_2_10_lpcxpresso_nxp_lpcxpresso_1769 to view the details.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://www.nxp.com/products/developer-resources/software-development-tools/developer-resources-/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc17xx:LPCOPEN-SOFTWARE-FOR-LPC17XX" title="https://www.nxp.com/products/developer-resources/software-development-tools/developer-resources-/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc17xx:LPCOPEN-SOFTWARE-FOR-LPC17XX"&gt;LPCOpen Software for LPC17XX|NXP&lt;/A&gt; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;Have a great day,&lt;/DIV&gt;&lt;P&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, 14 Sep 2017 02:04:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-Help-to-initialize-EINT2/m-p/700159#M28193</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-09-14T02:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso - Help to initialize EINT2</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-Help-to-initialize-EINT2/m-p/700160#M28194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks i will read it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 16:37:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/MCUXpresso-Help-to-initialize-EINT2/m-p/700160#M28194</guid>
      <dc:creator>andreyshtyrya</dc:creator>
      <dc:date>2017-09-15T16:37:39Z</dc:date>
    </item>
  </channel>
</rss>

