<?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: Missing SCT functions in lpcopen for LPC15xx</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Missing-SCT-functions-in-lpcopen-for-LPC15xx/m-p/513270#M98</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sidheroor on Thu Dec 17 09:35:40 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Miccio,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks. I didn't think about the lpcopen package in the App Note itself. I'll take a look.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Presumably, NXP will merge, fix and release a new lpcware sometime in the future.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sid&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:05:03 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:05:03Z</dc:date>
    <item>
      <title>Missing SCT functions in lpcopen for LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Missing-SCT-functions-in-lpcopen-for-LPC15xx/m-p/513268#M96</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sidheroor on Tue Dec 15 16:11:50 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 was looking at AN11538 for some code to get started on SCT and the simplest example seems to be the periph_SCT2_repetitive_irq. However, the example code will not work with lpcopen as functions for EventState and EventControl are not defined in lpcopen. The example code in the Application note is as follows - &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;
void SCT2_Init(void)
{
Chip_SCT_Init(LPC_SCT2);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable the SCT2 clock

Chip_SCT_Config(LPC_SCT2, SCT_CONFIG_32BIT_COUNTER&amp;nbsp; |// unified timers,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SCT_CONFIG_AUTOLIMIT_L&amp;nbsp;&amp;nbsp;&amp;nbsp; );// auto limit

Chip_SCT_SetMatchCount(LPC_SCT2, SCT_MATCH_0,(SystemCoreClock/100) - 1);//match 0 @ 100 Hz = 10 msec
Chip_SCT_SetMatchReload(LPC_SCT2, SCT_MATCH_0, (SystemCoreClock/100) - 1);


Chip_SCT_EventState(LPC_SCT2, SCT_EVENT_0, ENABLE_ALL_STATES); // event 0 happens in all states ----&amp;gt; FUNCTION IS MISSING IN LPCOPEN
Chip_SCT_EventControl(LPC_SCT2, SCT_EVENT_0, SCT_COMBMODE_MATCH);// match 0 only condition ----&amp;gt; FUNCTION IS MISSING IN LPCOPEN

Chip_SCT_EnableEventInt(LPC_SCT2,SCT_EVT_0);// event 0 generates an interrupt

NVIC_EnableIRQ(SCT2_IRQn);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // enable SCT2 interrupt

Chip_SCT_ClearControl(LPC_SCT2,SCT_CTRL_HALT_L);// start timer
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For now, I'm accessing the registers directly, but it will be nice to know if this is a known issue and when it will be fixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sid&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:05:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Missing-SCT-functions-in-lpcopen-for-LPC15xx/m-p/513268#M96</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Missing SCT functions in lpcopen for LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Missing-SCT-functions-in-lpcopen-for-LPC15xx/m-p/513269#M97</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by miccio on Thu Dec 17 06:35:59 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;It is a&amp;nbsp; fairly old (therefore know, i'd assume) bug, but you can find these (and other) functions in the LPCOpen version issued with the AN. Just look at "/AN11538_v4.0/code examples/LPC15xx/LPCOpen/software/lpc_core/lpc_chip/chip_15xx/"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I found slight differences in several files, so I would recommend to run a diff on the whole folder and check whether it's worth to **upgrade**. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On a side note, the syntax becomes preeeeetty verbose with those function, so manipulating the registers directly isn't so bad ;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:05:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Missing-SCT-functions-in-lpcopen-for-LPC15xx/m-p/513269#M97</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Missing SCT functions in lpcopen for LPC15xx</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Missing-SCT-functions-in-lpcopen-for-LPC15xx/m-p/513270#M98</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by sidheroor on Thu Dec 17 09:35:40 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Miccio,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks. I didn't think about the lpcopen package in the App Note itself. I'll take a look.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Presumably, NXP will merge, fix and release a new lpcware sometime in the future.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sid&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:05:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Missing-SCT-functions-in-lpcopen-for-LPC15xx/m-p/513270#M98</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:05:03Z</dc:date>
    </item>
  </channel>
</rss>

