<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>CAN driver question ...</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25753/can-driver-question</link><description> 
Hi, 

 
I am using the RL-ARM provided CAN driver. I have the need to
configure receive messages after I started the CAN driver. I use
&amp;quot;CAN_rx_object&amp;quot; to configure new receive objects (CAN-controller 2)
and this part is working. I noticed that after</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/125607?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2009 22:58:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ec087d33-a8eb-4fe6-8b71-67a85300908b</guid><dc:creator>while ();</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Frank,&lt;/p&gt;

&lt;p&gt;
if you do not need to use Acceptance filter then it is a better
solution that you do not call functions CAN_rx_object as that
function switches acceptance filter to be used.&lt;br /&gt;
Function CAN_init initializes acceptance filter as not used.&lt;/p&gt;

&lt;p&gt;
There is no point in calling CAN_rx_object function if you are not
using hardware filtering (acceptance filter).&lt;/p&gt;

&lt;p&gt;
Milorad&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/125605?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2009 14:47:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c0f90efa-265b-4e91-b9da-1f3dbf64364f</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
If you need filtering on one channel, then you should be able to
set up a wild-card filter for the other channel, and run with the AF
turned on.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/115105?ContentTypeID=1</link><pubDate>Thu, 06 Aug 2009 13:28:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:396d21b8-92a3-41d4-ab4b-49223b4f017e</guid><dc:creator>F D</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Milorad,&lt;/p&gt;

&lt;p&gt;
it is the only feasable solution as far as I can tell. The
datasheet specifies only one bit to enable hardware identifier
filtering. This means that both controllers have to use this feature
or both have to use software filtering. In my case I have to use both
controllers without acceptance filter.&lt;/p&gt;

&lt;p&gt;
- Frank&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/103292?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2009 23:21:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:599fda7b-ef99-4a5b-b42e-adc81efeca30</guid><dc:creator>while ();</dc:creator><description>&lt;p&gt;&lt;p&gt;
What you have done is really not quite ok, as what you have done
is you have turned Acceptance filtering off, because you store to
variable afmr values of Acceptance filter mode register which has
value 2 after init function (meaning it is turned off).&lt;br /&gt;
And at the end of the function you return that value 2 thus leaving
Acceptance filter turned off.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/77613?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2009 14:25:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b017b177-8447-4f15-badd-85c0152abed2</guid><dc:creator>F D</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
I identified the problem. In the function &amp;quot;CAN_hw_rx_object&amp;quot; the
following changes are necessary:&lt;/p&gt;

&lt;pre&gt;
  /* Setup Acceptance Filter
     Configuration
     Acceptance Filter Mode Register = OFF */
  u32 afmr = ptrcan_af-&amp;gt;AFMR;
  ptrcan_af-&amp;gt;AFMR = 0x00000001;

  ...

  ptrcan_af-&amp;gt;AFMR = afmr;
&lt;/pre&gt;

&lt;p&gt;
With these changes the CAN-Ctrl1 and CAN-Ctrl2 don&amp;#39;t interfere
each other in case of new acceptance filter settings.&lt;/p&gt;

&lt;p&gt;
- Frank&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/56488?ContentTypeID=1</link><pubDate>Sun, 02 Aug 2009 23:57:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1f97b57b-8d1a-4ced-bff5-9614edf5b29c</guid><dc:creator>while ();</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi,&lt;/p&gt;

&lt;p&gt;
I suggest you try to call function CAN_hw_init before calling
CAN_rx_object and then call start function after it so something like
this:&lt;/p&gt;

&lt;p&gt;
CAN_hw_init (1, 100000);&lt;br /&gt;
CAN_hw_init (2, 100000);&lt;br /&gt;
CAN_rx_object(2, 0, 22, STANDARD_FORMAT);&lt;br /&gt;
CAN_start (1);&lt;br /&gt;
CAN_start (2);&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/125611?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2009 11:51:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f10fff7a-970d-4953-9b17-7a5c40a80b94</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;as I already said, the first CAN controller does not use
acceptance filtering.&amp;quot;&lt;/p&gt;

&lt;p&gt;
Are you asking this question on more than one forum?&lt;/p&gt;

&lt;p&gt;
I can&amp;#39;t see anything about your use - or non-use - of acceptance
filtering in your prevous two posts.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/115106?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2009 11:43:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b40f6da7-f3d3-4283-ada1-da63e332cdd5</guid><dc:creator>F D</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Per Westermark,&lt;/p&gt;

&lt;p&gt;
as I already said, the first CAN controller does not use
acceptance filtering. CAN controller-1 uses a software filtering for
exactly this reason.&lt;/p&gt;

&lt;p&gt;
- Frank&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/103296?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2009 10:43:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c36095e7-01c1-4d1a-bd61-ea525dc24935</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
The CAN controller in the LPC2468 looks more or less identical to
the one in the LPC2368.&lt;/p&gt;

&lt;p&gt;
If you look in the datasheet, you will notice that the acceptance
filter module is shared, so any reconfiguration of filters will
affect both CAN channels.&lt;/p&gt;

&lt;p&gt;
If a reconfiguration of one controller also touches the acceptance
filter module, then the other controller will be affected.&lt;/p&gt;

&lt;p&gt;
But for best answers, you should look for someone who are using
the Keil-supplied CAN code.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/77612?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2009 09:56:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2039697a-26de-4327-8b16-f4d9bb4392c7</guid><dc:creator>F D</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Per Westermark,&lt;/p&gt;

&lt;p&gt;
I use the LPC2468 from NXP.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CAN driver question ...</title><link>https://community.arm.com/thread/56499?ContentTypeID=1</link><pubDate>Fri, 24 Jul 2009 09:53:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:59111b18-1d22-4f66-a517-9b8cb8157802</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You forgot to mention what processor.&lt;/p&gt;

&lt;p&gt;
Note that some processors have partly common hardware foth
multiple CAN devices. For example configuration of CAN filtering may
affect multiple channels.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>