<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; User Favorites: Phono</title>
		<link><a href='http://forums.leaflabs.com/profile.php?id=4965'>4965</a></link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:02:07 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?profile=4965" rel="self" type="application/rss+xml" />

		<item>
			<title>Phono on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-105788</link>
			<pubDate>Wed, 28 Oct 2015 07:47:23 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">105788@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, thanks a lot. Did you fix the issue with the declarations required in the core, but that make the inclusion of the HardwareCAN library mandatory?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>vagran on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-105783</link>
			<pubDate>Mon, 19 Oct 2015 10:08:57 +0000</pubDate>
			<dc:creator>vagran</dc:creator>
			<guid isPermaLink="false">105783@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I have recently faced the necessarity to use CAN bus on Olimexino-STM32. After reading all this topic I have forked libmaple repository on GitHub and added CAN bus support using library code posted here. The repository is here: &#60;a href=&#34;https://github.com/vagran/libmaple-olimexino-canbus&#34; rel=&#34;nofollow&#34;&#62;https://github.com/vagran/libmaple-olimexino-canbus&#60;/a&#62;&#60;br /&#62;
Data reading example in &#34;examples/olimexino-can.cpp&#34;. Tested with DJI multicopters on-board CAN bus.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Phono on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-105614</link>
			<pubDate>Fri, 09 Jan 2015 16:22:08 +0000</pubDate>
			<dc:creator>Phono</dc:creator>
			<guid isPermaLink="false">105614@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I have the same concern, and i read the source code of the library. I found this :&#60;/p&#62;
&#60;p&#62;-in HardwareCan.cpp (the classes exposed to the programmer)&#60;br /&#62;
CAN_STATUS HardwareCAN::filter(uint8 idx, uint32 id, uint32 mask)&#60;br /&#62;
{&#60;br /&#62;
	return can_filter(Port, idx, CAN_FIFO0, CAN_FILTER_32BIT, CAN_FILTER_MASK, 0, 0);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;-in CAN.C&#60;br /&#62;
CAN_STATUS can_filter(CAN_Port* CANx, uint8 filter_idx, CAN_FIFO fifo, CAN_FILTER_SCALE scale, CAN_FILTER_MODE mode, uint32 fr1, uint32 fr2)&#60;/p&#62;
&#60;p&#62;Apparently, the function filter calls the function can_filter, and forces various parameters, including the MASK mode. However, I am wondering why the parameters fr1 (the identifier) and fr2 (the mask) are ignored, and replaced by 0, 0.&#60;br /&#62;
I do not think that the filter function can be useful anyhow.&#60;br /&#62;
W893, would this be a mistake? Wouldn't it be correct to change the function filter as follows :&#60;/p&#62;
&#60;p&#62;CAN_STATUS HardwareCAN::filter(uint8 idx, uint32 id, uint32 mask)&#60;br /&#62;
{&#60;br /&#62;
	return can_filter(Port, idx, CAN_FIFO0, CAN_FILTER_32BIT, CAN_FILTER_MASK, id, mask);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;?&#60;br /&#62;
Thanks for this nice library that I have used now for many months, and I hope we can improve it with a little help from each other.&#60;br /&#62;
Jean-Marc
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alexeys on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-105420</link>
			<pubDate>Tue, 03 Jun 2014 06:36:12 +0000</pubDate>
			<dc:creator>alexeys</dc:creator>
			<guid isPermaLink="false">105420@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
Need help to configure can bus Filter.&#60;br /&#62;
canbus.filter(idx,id,mask)&#60;br /&#62;
what is idx ? how configure it?&#60;br /&#62;
is id -  msg.ID ?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MelonFarmer on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-105312</link>
			<pubDate>Sat, 05 Apr 2014 15:06:30 +0000</pubDate>
			<dc:creator>MelonFarmer</dc:creator>
			<guid isPermaLink="false">105312@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Edit: Had an issue where 500k Baud was not working. I was too quick to jump to here for help and didn't even think about termination. At any rate for anybody who has a similar problem, where 250k works, and 500k does not, ensure proper termination, because it might not work at a higher baud.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Tiktaalik on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-105299</link>
			<pubDate>Fri, 21 Mar 2014 06:59:26 +0000</pubDate>
			<dc:creator>Tiktaalik</dc:creator>
			<guid isPermaLink="false">105299@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I have a MapleIDE project using an SKPang CANbus shield, which was working nicely until I crushed it in a bag. I've bought an Olimexino and am trying to transfer my old sketch to the Oli, but my old sketch relied on MCP2515.c's Interrupt method. I'm sure I'm being dense, but although I can see the IRQ versus pool [sic?] modes in x893's lib (thanks, x893!) and other people's code posts, but I can't see the interrupt-handling functions in x893's lib.&#60;/p&#62;
&#60;p&#62;How do I detect and handle a CAN interrupt in a MapleIDE sketch using x893's lib?&#60;/p&#62;
&#60;p&#62;Thanks again to x893.&#60;br /&#62;
Tik
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alfa on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-105118</link>
			<pubDate>Thu, 26 Dec 2013 02:25:03 +0000</pubDate>
			<dc:creator>alfa</dc:creator>
			<guid isPermaLink="false">105118@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I've a difficulty in getting CAN work on Olimexino and I'm using Eclipse. I've followed what has been suggested by X893 &#38;amp; Phone which includes updating 3 libmaple core libraries(rcc.h, rcc.c and usb.c) and Phone's bug fixes. Nevertheless, I ended up getting the following error:&#60;/p&#62;
&#60;p&#62;&#34;libmaple/usb/stm32f1/usb.c:37: fatal error: usb_hardware.h: No such file or directory&#60;br /&#62;
compilation terminated.&#34;&#60;/p&#62;
&#60;p&#62;Any hints/helps are highly appreciated..Thanks in advance.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MelonFarmer on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-104991</link>
			<pubDate>Fri, 29 Nov 2013 13:52:06 +0000</pubDate>
			<dc:creator>MelonFarmer</dc:creator>
			<guid isPermaLink="false">104991@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm running at 250kbps, most vehicles are around there I've found, so 1.25 is pretty generous, quite a bit of overhead, again I just fiddled around until I stopped losing messages! I imagine there's a better way to to that though. Also its extended IDs I'm using.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iainism on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-104977</link>
			<pubDate>Mon, 25 Nov 2013 16:34:59 +0000</pubDate>
			<dc:creator>iainism</dc:creator>
			<guid isPermaLink="false">104977@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;1.25ms is fairly fast, what kind of bus utilisation does that give you?&#60;/p&#62;
&#60;p&#62;Edit:  1.25ms is VERY fast, if you're sending 11-bit IDs at 125kbps then an 8-byte message takes 1.004ms to send (including interframe spacing and assuming worst-case bit-stuffing) so if there's any other traffic on the bus then you're pretty much guaranteeing collisions!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MelonFarmer on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-104968</link>
			<pubDate>Sat, 23 Nov 2013 13:38:18 +0000</pubDate>
			<dc:creator>MelonFarmer</dc:creator>
			<guid isPermaLink="false">104968@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I'm using Maple IDE and x893's library with the fixes from other users. Works Great  for everything I've been doing!&#60;/p&#62;
&#60;p&#62;I've heard some people like eclipse, but I've yet to try. Maple is just a glorified notepad, but it works well enough. &#60;/p&#62;
&#60;p&#62;I've done a couple projects with it and works great. &#60;/p&#62;
&#60;p&#62;If anybody was having an issue with sending a lot of messages in a row like I was here's a fix that works pretty good.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;CAN_TX_MBX CANsendB(CanMsg *pmsg)
{
   CAN_TX_MBX mbx;
   mbx = canBus.send(pmsg);
   while(mbx == CAN_TX_NO_MBX)
   {
     delayMicroseconds(1250);
     mbx = canBus.send(pmsg);
   }
   return mbx ;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I took the code posted by Phono, but I would still lose a message or two, which for most applications is fine, however that didn't work for me. I found 1.25 ms was the smallest amount of time I could delay to not lose any messages after ~3-4 consecutive sends. I was using IRQ mode, if that maybe caused the requirement for that. &#60;/p&#62;
&#60;p&#62;As I also was sending/receiving serial at the same time, I need the delay to be very small, as the delay blocks reading and caused lost data. However I haven't had any issue with Data loss with that code so far. I'm open to improvements though, I ain't no expert.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Giovanni on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-104941</link>
			<pubDate>Sun, 17 Nov 2013 20:50:10 +0000</pubDate>
			<dc:creator>Giovanni</dc:creator>
			<guid isPermaLink="false">104941@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello MelonFarmer, hello every one, I am Giovanni from Brisbane Australia.&#60;/p&#62;
&#60;p&#62;I was reading this forum under suggestion of an Olimex forum, about the Olimexino-STM32.&#60;/p&#62;
&#60;p&#62;I want to start a project with the Olimexino-STM32 and CAN protocol.&#60;/p&#62;
&#60;p&#62;I have some question:&#60;/p&#62;
&#60;p&#62;- witch is the best enviroment to start a project? ( like IAR Embedded Workbench or Maple or eclipse..)&#60;/p&#62;
&#60;p&#62;- have any one a simple code that use Can Bus over the OLIMEXINO-STM32 board that is not using the &#34;IAR Embedded Workbench 6.30&#34; like in the Olimex Can Bus demo code?&#60;/p&#62;
&#60;p&#62;Appreciate Your time and help&#60;/p&#62;
&#60;p&#62;Have Fun&#60;/p&#62;
&#60;p&#62;Giovanni
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MelonFarmer on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-28398</link>
			<pubDate>Mon, 12 Aug 2013 13:29:01 +0000</pubDate>
			<dc:creator>MelonFarmer</dc:creator>
			<guid isPermaLink="false">28398@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Good news everyone! I've managed to solve my problem. Ends up I needed to switch to CAN_MODE_NORMAL to get anywhere with the hardware I'm working with.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>MelonFarmer on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=7#post-28382</link>
			<pubDate>Fri, 09 Aug 2013 17:59:36 +0000</pubDate>
			<dc:creator>MelonFarmer</dc:creator>
			<guid isPermaLink="false">28382@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi, i'm currently working on a project using three Olimexino-STM32s. Each board is to be connected to a separate CAN bus and then they will communicate to each-other via serial. So far I can communicate messages through serial and send CAN messages by using x893's files, however I cannot figure out how to make any board receive from the CAN bus. I am using multiple different CAN monitoring programs to send various CAN data as well as connection the boards to CAN devices to no avail. I have tried to use the code others in the thread posted, and still nothing. For anybody who is able to receive/read CAN messages, could you possibly post example code for it? Maybe also a checklist of sorts of what is required to receive?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>speakman on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=6#post-26952</link>
			<pubDate>Tue, 18 Jun 2013 06:33:03 +0000</pubDate>
			<dc:creator>speakman</dc:creator>
			<guid isPermaLink="false">26952@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;HDS: I would recommend you to move to libopencm3. Unfortenately CAN is currently missing the generated Docs but there is a pretty well-documented source and header files for CAN and there is even a CAN example in the libopencm3-examples repo.&#60;/p&#62;
&#60;p&#62;The libopencm3 also seems way mature than libmaple at the moment. I'm really satisfied with my switch.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>HDS on "Using the CAN interface"</title>
			<link>http://forums.leaflabs.com/topic.php?id=802&amp;page=6#post-26739</link>
			<pubDate>Fri, 14 Jun 2013 11:34:36 +0000</pubDate>
			<dc:creator>HDS</dc:creator>
			<guid isPermaLink="false">26739@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hi, x893 -&#60;br /&#62;
I just was trying the code example you had posted above,&#60;br /&#62;
but it seems to have been gone (&#60;a href=&#34;http://akb77.com/g/stm32/maplehardwarecan/&#34; rel=&#34;nofollow&#34;&#62;http://akb77.com/g/stm32/maplehardwarecan/&#60;/a&#62;)&#60;br /&#62;
Is it still available?&#60;br /&#62;
I#m just trying my first steps with CAN...
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
