Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 13 of 13

Thread: Need pointers in converting a program from mbed to teensy 3

  1. #1

    Need pointers in converting a program from mbed to teensy 3

    I have built 2 teensy 3 projects and am really enjoying working with this board. Now I am looking at converting an mbed project to teensy 3.0. Is this possible? Are there any pointers that may be able to help me along the path?

    The project is this: Just4Trionic

    EDIT: I guess the most important question is does the chip on the Teensy 3.0 have a CAN bus port or not. The Freescale docs show that some MK20DX128 chips have CAn and others do not. It does not appear that the chip on the teensy has this capability, so I may be out of luck.

    Regards,

    Keith
    Last edited by keithg; 02-12-2013 at 02:01 PM.

  2. #2
    Senior Member
    Join Date
    Jan 2014
    Location
    London, UK
    Posts
    109
    My compatibility layer might help:

    http://forum.pjrc.com/threads/25008-...tibility-layer

  3. #3
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    I believe it does have CAN bus functionality as Paul has talked about writing a library for it not too long ago.

  4. #4
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408
    Quote Originally Posted by Headroom View Post
    I believe it does have CAN bus functionality as Paul has talked about writing a library for it not too long ago.
    I believe you must be thinking of the Teensy 3.1 that has the the more powerful MK20DX256VLH7 chip on it. See the comparison here. The Teensy 3.0 does not feature a port for CAN bus compatibility.

  5. #5
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Teensy 3.0, I think, is retired in favor of Teensy 3.1 which is much more for about the same cost, same pinout.

  6. #6
    I am trying to build a CAN library, but the going is tough, as I cannot find a CAN library for this chip .... anyone know of one?

  7. #7
    dpharris, I could not understand your question you mentioned that you are "Developing a CAN library for the controller but unable to find a CAN library for this Chip"
    If there was already a library there would be no need of you to develop one in the first case. So can you please explain a bit of what exactly are you expecting.

  8. #8
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Quote Originally Posted by dpharris View Post
    I am trying to build [USE?] a CAN library, but the going is tough, as I cannot find a CAN library for this chip .... anyone know of one?
    Build or use?

    A good starting point is one of the existing Arduino CAN bus libraries. Seems fairly simple to change the portion of the code that is CAN controller hardware specific.
    The model railroaders use a lot of CAN bus with microprocessors.
    Google search points to lots on this topic.
    Last edited by stevech; 01-31-2014 at 03:30 AM.

  9. #9
    Yes, I am 'one of those model railroaders', see OpenLCB.org. Sorry, I had expressed myself poorly. I cannot find a manufacturer's library for this chip to adapt to our purposes, But did find some for other chips with Flexcan controllers. The initialization and operation of these CAN controllers is not at all trivial :-(. If someone has a pointer to some existing code, that would be helpful.

    David.

  10. #10
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    No doubt, you've already read some of the CAN sections in
    http://cache.freescale.com/files/32b...geType=product

  11. #11
    Yes, thanks. If there is nothing else, that might suffice. There is often subtleties that are not obvious, and CAN is rather unforgiving, so a code sample is very helpful.

    David

  12. #12
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    I briefly looked in Freescale's App Notes. Didn't see one but more looking, or an inquiry of Freescale's field app engr makes sense.
    Another place to look might be IAR or Keil's app notes.

  13. #13
    Senior Member
    Join Date
    Jan 2013
    Posts
    966
    Quote Originally Posted by Constantin View Post
    I believe you must be thinking of the Teensy 3.1 that has the the more powerful MK20DX256VLH7 chip on it. See the comparison here. The Teensy 3.0 does not feature a port for CAN bus compatibility.
    You're right.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •