<?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>LPCXpresso IDE中的主题 Re: C_can api</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574304#M21818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by igorsk on Fri Sep 17 09:54:17 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Someone posed this to the lpc2000 group, supposedly from NXP support:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;The correct declaration of the ROM typedef struct is:&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;typedef struct _ROM {
&amp;nbsp; const unsigned p_usbd;
&amp;nbsp; const unsigned p_clib;
#ifdef CANROMD_PRESENT
&amp;nbsp; const CAND * pCAND;
#else
&amp;nbsp; const unsigned pCAND;
#endif /* CANROMD_PRESENT */
&amp;nbsp; const unsigned p_pwrd;
&amp;nbsp; const unsigned p_dev1;
&amp;nbsp; const unsigned p_dev2;
&amp;nbsp; const unsigned p_dev3;
&amp;nbsp; const unsigned p_dev4;
}&amp;nbsp; ROM;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example code provided by NXP Tech support works with the on-chip drivers correctly to TX and RX CAN messages.&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:52:05 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:52:05Z</dc:date>
    <item>
      <title>C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574296#M21810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rcazalis on Wed Aug 18 12:00:01 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I started to write my own CAN functions (init, send and receive) but realised there was built-in functions in ROM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It makes sense to use those.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've noticed some contradictions in the LPC11C14 datasheet around the C_CAN API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;On page 223 it says the init_can() function has 1 argument whereas on the 4th line of following page it gives 2... which one is correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone got this running?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there more detailed explainations somewhere about this API? I must admit I struggle a bit to understand how it works...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574296#M21810</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574297#M21811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rcazalis on Wed Aug 18 13:23:25 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;by the way, I've inserted all the C_CAN API code examples that is in the LPC11C14 user manual but I get an error message on:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ROM **rom = (ROM **)0x1fff1ff8UL;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error message is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Invoking: MCU C Compiler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arm-none-eabi-gcc -D__USE_CMSIS=CMSISv1p30_LPC11xx -DDEBUG -D__CODE_RED -D__REDLIB__ -I"C:\Documents and Settings\User\My Documents\lpcxpresso_3.4\workspace\CMSISv1p30_LPC11xx\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -Wa,-ahlnds=main.asm -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o"src/main.o" "../src/main.c"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;../src/main.c:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574297#M21811</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574298#M21812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Thu Aug 19 02:45:08 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The error is because ROM is not defined. I've looked the the UM and there is no definition for ROM...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps somebody from NXP can comment/provide the definition, and comment on the original question?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574298#M21812</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574299#M21813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by igorsk on Thu Aug 19 03:23:53 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;From a quick glance at the UM, I _think_ it is something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
typedef struct _ROM
{
&amp;nbsp; CAND *pCAND;
&amp;nbsp; // other pointers TBD
} ROM;
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;And the single mention of "pCANAPI" should be replaced by "pCAND". I can't be sure about the init_can function but most likely it accepts one argument. However, passing it two arguments will not break anything, so you could just do that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If someone sends me a ROM dump I'll be able to say for sure &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574299#M21813</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574300#M21814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rcazalis on Fri Aug 20 04:13:12 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Igorsk for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As ROM is not defined it still doesn't work, but I've changed path: I've written my own commands as it is easy enough and I fully control what's happening.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Said that, nothing happens :(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone managed to get the CAN running on the 11C14?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've just done an INIT and then call a SEND, but nothing comes out on the pins...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574300#M21814</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574301#M21815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by igorsk on Fri Aug 20 04:50:21 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Why do you say "ROM is not defined"? I have the definition right there in my post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574301#M21815</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574302#M21816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rcazalis on Fri Aug 20 06:03:34 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, you are right, it does compile but I still get confused by the API functions. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example how do you control MSGVAL to set a message as valid or to invalidate one?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To me a message configuration needs ARB (32 bits), MASK (32 bits), CTRL (16 bits) and a message number (1 to 32).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CMDMASK could be set to all ones at worst.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Still some parameters are missing in the command.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it is poorly documented but NXP's support doesn't seem to have an answer...:D&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your help. Do you have the CAN working on an 11C14?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574302#M21816</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574303#M21817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by igorsk on Fri Aug 20 07:15:08 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have the chip and I know very little about CAN, sorry :) From the manual it seems that the ROM interface is intended to be very simple and handles errors etc by itself. If you want fine-grained control you'll probably have to use direct HW interface.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574303#M21817</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: C_can api</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574304#M21818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by igorsk on Fri Sep 17 09:54:17 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Someone posed this to the lpc2000 group, supposedly from NXP support:&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;The correct declaration of the ROM typedef struct is:&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;typedef struct _ROM {
&amp;nbsp; const unsigned p_usbd;
&amp;nbsp; const unsigned p_clib;
#ifdef CANROMD_PRESENT
&amp;nbsp; const CAND * pCAND;
#else
&amp;nbsp; const unsigned pCAND;
#endif /* CANROMD_PRESENT */
&amp;nbsp; const unsigned p_pwrd;
&amp;nbsp; const unsigned p_dev1;
&amp;nbsp; const unsigned p_dev2;
&amp;nbsp; const unsigned p_dev3;
&amp;nbsp; const unsigned p_dev4;
}&amp;nbsp; ROM;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example code provided by NXP Tech support works with the on-chip drivers correctly to TX and RX CAN messages.&lt;/SPAN&gt;&lt;HR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:52:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/C-can-api/m-p/574304#M21818</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:52:05Z</dc:date>
    </item>
  </channel>
</rss>

