<?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のトピックProblem with Chip_GPIO_SetPinState</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-Chip-GPIO-SetPinState/m-p/580148#M20175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by strawhats10 on Fri Jul 31 08:52:48 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a question about setting the pin state in LPCXpresso54102 platform. What i would like to do is to set a pin high before a task is executed and set it back to low after the task has been executed. Right now I am doing it like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#define GPIO_PORT 1
#define GPIO_PIN 29

Chip_GPIO_SetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN, true);
delay();
bool temp1= Chip_GPIO_GetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN);
task();
Chip_GPIO_SetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN, false);
delay();
bool temp2= Chip_GPIO_GetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN);
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that i check the values of temp1 and temp2 and they do not change at all. It is like the Chip_GPIO_SetPinState has no effect at all. Am I missing something? Thank you in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:20:16 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:20:16Z</dc:date>
    <item>
      <title>Problem with Chip_GPIO_SetPinState</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-Chip-GPIO-SetPinState/m-p/580148#M20175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by strawhats10 on Fri Jul 31 08:52:48 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a question about setting the pin state in LPCXpresso54102 platform. What i would like to do is to set a pin high before a task is executed and set it back to low after the task has been executed. Right now I am doing it like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#define GPIO_PORT 1
#define GPIO_PIN 29

Chip_GPIO_SetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN, true);
delay();
bool temp1= Chip_GPIO_GetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN);
task();
Chip_GPIO_SetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN, false);
delay();
bool temp2= Chip_GPIO_GetPinState(LPC_GPIO, GPIO_PORT, GPIO_PIN);
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that i check the values of temp1 and temp2 and they do not change at all. It is like the Chip_GPIO_SetPinState has no effect at all. Am I missing something? Thank you in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:20:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-Chip-GPIO-SetPinState/m-p/580148#M20175</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Chip_GPIO_SetPinState</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-Chip-GPIO-SetPinState/m-p/580149#M20176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by HCTEK on Tue Aug 04 02:31:29 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;first you must configure the pin to a specific function. For your case it is the GPIO. Normally it is in the System Control Unit (SCU) registers. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:20:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-Chip-GPIO-SetPinState/m-p/580149#M20176</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:20:17Z</dc:date>
    </item>
  </channel>
</rss>

