Can2.0b Implementation

XCore Project reviews, ideas, videos and proposals.
Post Reply
cschopges
Member++
Posts: 28
Joined: Mon Jul 25, 2016 2:03 pm

Can2.0b Implementation

Post by cschopges »

Hi guys,

I will implement Can2.0b on an Xmos microcontroller. Since I want to change the protocol afterwards, I´ll work with the open source library found on github (the code given by Xmos being a static library and therefore not modifiable).

However, before starting I have a few questions:
- The can library is indicated to only work on the old architecture XS1 and not on the new one. I don´t really get why? Is it simply because it has never been tested on an xcore200 microcontroller or is there a specific feature that xcore200 microcontroller does not have?

- The advised board is the XK-SK-L2-ST and the XA-SK-ISBUS slice. Does Can2.0b only work on this development board or could it also work on another one?

Thanks for your replies

Charlotte


henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

Hi Charlotte,

Yes - the library would have not been tested on xCORE200. You may find there are a few features in the XS2 instruction set that may help implementing CAN easier. An extra CRC instruction and dual issue should help with some of the critical sections.

Re the hardware: you will need a CAN transceiver; you can connect this to anything (an explorer board?). xCORE200 does support one-drain drivers which may be useful when interfacing to the transceiver.

Cheers,
Henk
cschopges
Member++
Posts: 28
Joined: Mon Jul 25, 2016 2:03 pm

Post by cschopges »

Hi Henk,

Thanks for the quick reply.
Correct me if I am wrong, but theoretically the code should work on the XS1 architecture as well as on the xcore200 without modifications?

Moreover, I assume I should use the xCORE-200 General Purpose sliceKIT Part #: XK-SK-XL216-ST which isn´t available anymore. Do you know when the substitute board, the XK-SK-X200-ST will be available? If it isn´t available, what board would you recommend me? The General Purpose sliceKIT of the XS1 architecture or something else?

Thanks

Charlotte
henk
Respected Member
Posts: 347
Joined: Wed Jan 27, 2016 5:21 pm

Post by henk »

Hi Charlotte,

Yes, it is very likely that the code would work after recompilation. However, the architecture is slightly different so the timings can be slightly different. XTA will inform you if it no longer meets timing.

Re the substitute board - I don't know when it will be available I am afraid. If you want to do something fast, the explorer board is a good alternative. It does not have any slices, but plenty of .1" through hole vias.

Cheers,
Henk
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Is this what you are after ?

http://www.newark.com/xmos/xk-sk-l2-st/ ... dp/07X2001

http://www.digikey.com/product-detail/e ... ND/3903832

Varying with the complexity of your project, the XS1 series may be just fine and a lower cost option. However, the XCORE-200 series offer a mix of new features but then you will have to review the differences to take the confirmed working code developed for the XS1 series and migrate to the new core.

To be open, you will end up purchasing one of every style of these boards, sooner or later for a proper evaluation.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Charlotte,

in your shopping spree, consider to pickup also the very low cost XMOS startKit:

http://www.digikey.com/product-detail/e ... ND/4485710

This low cost kit is based on a 16 core XMOS CPU but only 8 cores are available for your use. However, there is an onboard PCIe style of connector which should mate fine with your IS-BUS sliceCARD:

https://www.xmos.com/support/boards?product=16297

so unless the XMOS CAN2.0b code is very demanding on the # of cores to operate - you should be able to test with 1 x startKit + 1 x IS-BUS sliceCARD (seated into the single PCIe slot). The benefit of the larger XMOS Sliceboard is that you can also develop with Ethernet using yet another Ethernet PHY breakout board, etc. AND have 16 cores for your disposal.
cschopges
Member++
Posts: 28
Joined: Mon Jul 25, 2016 2:03 pm

Post by cschopges »

@ Henks:
Thanks for your reply. I think I´ll go for the old architecture and once I get it working there, I´ll move to the xCore-200: with the new board if available at that time or with the explorer kit.

@ mon2:
Thanks, that´s what I am after, but it is the old architecture. As I said, I think I´ll start with that one. And indeed, I´ll probably end up with both of them.
As for the startkit, I´ve already been working with it for a month now to get the basic idea of xmos. But given the project I want to do (probably a few Can ports), the startkit won´t be enough.
Post Reply