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

Thread: Teensy LC max SPI Speed

  1. #1
    Junior Member
    Join Date
    Aug 2016
    Location
    Germany
    Posts
    2

    Teensy LC max SPI Speed

    Hey,
    I played a little bit with the Teensy LC SPI and discovered that I can't get more than 12MHz at the SCK pin. Is this the maximum setting for the Teensy LC or am I doing something wrong?
    Her is my test code:

    Code:
    #include <SPI.h>
    
    void setup() {
      SPI.begin();
    }
    
    void loop() {
      SPI.beginTransaction(SPISettings(24000000, MSBFIRST, SPI_MODE0)); // This outputs only a 12MHz Clock on the SCK pin
      SPI.transfer(255);
      SPI.endTransaction();
      delay(10);
    }

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,558
    On LC, the max SPI clock is 12 MHz.

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,421
    I could be wrong, but my quick check is that the SPI speed has a max of F_BUS/2 on the Teensy LC and at MAX CPU of 48mhz, F_BUS set to 24mhz and so half 24/2 = 12mhz

    Kurt

  4. #4
    Junior Member
    Join Date
    Aug 2016
    Location
    Germany
    Posts
    2
    Ah ok I thought F_BUS would be 48MHz.
    Thanks for the correction.

Posting Permissions

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