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

Thread: Teensy connected to Olimex Lime2

  1. #1
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,066

    Teensy connected to Olimex Lime2

    I wanted to connect teensy 3.6 to Olimex Lime2 running Linux.

    In particular, I wanted to use the Olimex not only to interface to Teensy for data exchange (USB,SPI,I2C) but also for downloading Hex files using the CLI.
    even if my Linux is somewhat rusty (all my experience is pre-distribution, i.e Kernel 0.99, never used any distribution), I do not foresee major issues but wanted to ask anyhow:

    Q: Is there some user on the forum who has experience with this type of HW combination? If yes, any advice?

  2. #2
    I use teensy 3.2 with yun shield from dragino and CLI is provided in yun firmware. Hw signal from the yun is provided to trig prog pin. I also use arduino adapter shield from sparkfun for easy mounting. I did not try the SPI link, just USB and UART.

  3. #3
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,066
    Quote Originally Posted by Vincenet View Post
    I use teensy 3.2 with yun shield from dragino and CLI is provided in yun firmware. Hw signal from the yun is provided to trig prog pin. I also use arduino adapter shield from sparkfun for easy mounting. I did not try the SPI link, just USB and UART.
    Thanks for coming back. Even if not exactly my configuration (The Olimex is not my choice but selected by others), it may be useful for others reading this thread.

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,499
    I have not tried Olimex boards, I have run a few different Linux boards, like RPI2/3, plus several Odroid boards (C1, C2, XU4) and an UP board (x86) and earlier with Edison board.

    I have played around with my own RPI Shield boards for 3.2 or 3.6.

    I have mostly used Usart and USB, but have experimented some with SPI and maybe a long time ago played with I2C...
    With some of the boards, I found that SPI at the User code level (SPIDEV) could be REAL slow. Especially between SPIDEV calls. So gained some back by making sure transfers were combined as much as possible...

    Note: with I2C, my earlier tries on the Linux boards were talking to devices and not Teensy. Keep meaning to setup a Teensy with I2C in slave mode to talk to Linux board...

  5. #5
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,066
    Quote Originally Posted by KurtE View Post
    I have mostly used Usart and USB, but have experimented some with SPI and maybe a long time ago played with I2C...
    With some of the boards, I found that SPI at the User code level (SPIDEV) could be REAL slow. Especially between SPIDEV calls. So gained some back by making sure transfers were combined as much as possible...
    would a only USB communication (two-way) between Teensy and Linux be faster/easier on Linux side than trying to use SPI/I2C?
    I have to exclude UART, as for the particular Olimex board all UART ports are connected to 5V MAX chips and therefore not accessible for my T3.6.
    I will get 3.3V digital pins for reset, prog and other pins, so maybe USB is all what I need to worry about?

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,499
    Again I don't know this board or setup, so your guess is as good as mine...

    As for easier to use Usart, yes... You simply open the device and do reads/writes... Of course after you take care of setting up board rate and the like (termios)

    Hopefully someone else here more knowledgeable and experienced with Linux can give more detailed answers... I mostly just tinker along.

    When I started playing with my first linux board RPI2, I create a github project: https://www.github.com/kurte/Raspberry_pi that was a hodge podge of stuff, like a simple library of code where I emulated some of the Arduino setup... So I have a version of Stream and a Serial wrapper...

    In other cases I converted some of this over to using the MRAA library (started with the Intel Edison), Still using some of the MRAA with some of the programs, but don't think your board is currently supported. More information up at: https://github.com/intel-iot-devkit/mraa

    So you might try running some form of SPI test to see how fast it responds. One test I tried on Edison, was to try to run the ILI9341 display in user mode... It was real SLOW! I confirmed just how slow by watching the stream using Logic Analyzer. But your mileage will differ depending on how on that board implements SPI... On Edison I think it was secondary chips, talking to the main processor I think using I2C?

  7. #7
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    688
    I've got a few Teensy 3.2s connected to WiFi routers in station mode running OpenWrt. Most of the routers are MIPS processors. I've tried porting the CLI loader to download hex files, but haven't succeeded yet. For communication, USB serial works well enough for data logging and lighting controls. Getting the terminal setting correct can require some fiddling and it can take a bit of digging to find the right driver modules to load. At the time $10 wifi routers were the cheapest way of adding a wireless connection to my home network I could find. Going forward I'd probably replace the WiFi router with a Raspberry Pi. The Pi has the advantage that the Arduino/Teensyduino IDE runs on it.

Posting Permissions

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