Are having similar problem and was wondering if anyone have managed to
avoid dropped frames with the MCP2515 or could recommend another CAN
controller to use with Gumstix Overo.
On Sat, Aug 21, 2010 at 2:01 PM, Benny B. Simonsen <bbs@...> wrote:
> 2010/8/20 Dave Robins <daverobins@...>
>> Hey everyone,
>> We are a company who's main business is CAN bus. Personally I have
>> been involved with Microchip when the mcp2515 was designed because we
>> were a large user of the mcp2510. I know this part very well. The way
>> the OMAP and the mcp2515 are architect-ed would make a marriage of
>> them one that is made in hell.
>> For most applications, this part is not well suited for connecting to
>> the Gumstix/OMAP because a of the following reasons:
>> 1) The main problem with 2515 is that it only has two receive buffers
>> (and one assembly buffer) and very limited filtering. This means its
>> needs a lot of interrupt level servicing. On 500K CAN bus a 0 data
>> byte message can come in every 50us.
>> 2) There are many SPI transactions you need to do to figure out what
>> buffer is full - this means a lot of time in the interrupt issuing spi
>> transactions and then acting on the result.
>> 3) The gumstix and most high speed processors are like a bullet train
>> - they are fast as hell but don't like switching contexts a lot. A pic
>> is different (not pic32 its like the arm) - they have interrupt
>> response times in the order of 5 clocks. These means they can service
>> the mcp2515 high message rate like cakewalk. Most peripherals on these
>> high speed processors have a decent FIFO on them for this reason.
>> The best solution is to have FIFO buffering on the CAN messages. So
>> you are much better connecting to a processer or FPGA that has a CAN
>> controller. The processor can buffer and possibly filter CAN messages
>> and hand them to the OMAP when its ready. Microchip has some great
>> parts dsPIC and PIC32 that have CAN and great filtering.
>> Finally, the use case where the 2515 would work, if you only have two
>> CAN messages you are interested in the MCP2515 or you generally don't
>> care about dropping messages the 2515 will work great. If its not your
>> application you will suffer...
>> Very Truly Yours,
>> Dave Robins
>> President & Engineering Manager
>> Intrepid Control Systems, Inc.
>> 5700 18 Mile Rd
>> Sterling Heights, Michigan 48314 USA
>> This SF.net email is sponsored by
>> Make an app they can't live without
>> Enter the BlackBerry Developer Challenge
>> gumstix-users mailing list
> Hey Dave,
> First thanks for being so brave to admit that you were involved in the
> decision which did limit the 2515 RX buffer size to only two frames + the
> assembly buffer ;-)
> Ok I know the 2515 were made for a different purpose than connect them to a
> "bullet train" processor, but lately I really did wish that a few extra RX
> buffers were added!
> When I start to test the 2515 on the Overo I did know that the mariage could
> be problematic, but did not realise that I almost would be able to hear the
> OMAP and the 2515 quarrel even when the power was off!
> I still think / hope I can get my 250Kbps system running, but realise that
> it might not be the case if I want to avoid dropped RX frames.
> If I drop the 2515 I will probably go for the SJA1000 if I will try to do
> minimal SW development (guess this is the most tested device in Socket CAN).
> I have not checked how easy it will be to interface this device with an
> Overo / TOBI, but guess it will require some kind of board that will be
> placed between the Overo and the TOBI.
> If I will do more SW development I will probably go for the processor with
> CAN controller(s) (NXP LPC series because I have used that before). If I do
> that I guess the interface between this processor and the OMAP could be SPI.
> If I allow a big chunk of data to be transfered at a time the SPI will be
> fine (at least I think so).
>>Finally, the use case where the 2515 would work, if you only have two
>>CAN messages you are interested in the MCP2515 or you generally don't
>>care about dropping messages the 2515 will work great. If its not your
>>application you will suffer...
> Exactly. Two messages at a time is fine. 3 with no space between them and
> you are in trouble even at lower bus speed (you should probably be below
> 100Kbps to be just relatively sure)
> Dave a little off topic, but i checked your company. Does the ValueCAN3 CAN
> adaptor support Linux (Socket CAN)?
> This SF.net email is sponsored by
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> gumstix-users mailing list