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

Thread: mk20dx256 - where is SPI1_SCK?

  1. #1
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    894

    mk20dx256 - where is SPI1_SCK?

    I'm trying to figure out what signal multiplexing choices I have for SPI1 on the teensy 3.1 and there seem to be none. I've gone through the whole mux list over and over again, but no sign of SPI1_SCK. Is that an error in the document or is it simply not possible to use SPI1 on that chip? Even searching the pdf for "SPI1_SCK" only returns 1 result and that simply states that this signal exists.

    Edit: I just found out that SPI1_SCK does exist in the datasheet for the 100-pin devices. Am I screwed?

    Regards

    Christoph
    Last edited by christoph; 05-07-2014 at 03:02 PM. Reason: added 100-pin device remark

  2. #2
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    894
    I don't know where I have that information from but I thought that the mk20dx256 has two SPIs. Looks like I was wrong. Nevermind.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    25,212
    I believe the silicon actually has SPI1 on the chip, but this 64 pin version simply doesn't have the clock pin available.

    It'd be interesting, but not very useful, to try using SPI1 and see if the DOUT pin toggles when sending data. Of course, without the clock, it's not very useful.

  4. #4
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    894
    How about an obscure memcopy with a short between DOUT and DIN?

  5. #5
    Quote Originally Posted by PaulStoffregen View Post
    It'd be interesting, but not very useful, to try using SPI1 and see if the DOUT pin toggles when sending data. Of course, without the clock, it's not very useful.
    If SPI1 DOUT works, it would be useful for adding a second output to StableWS2811.

  6. #6
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    894
    Quote Originally Posted by jimparis View Post
    If SPI1 DOUT works, it would be useful for adding a second output to StableWS2811.
    Even without a clock?

  7. #7
    Quote Originally Posted by christoph View Post
    Even without a clock?
    Yeah, I only use DOUT.

  8. #8
    Senior Member
    Join Date
    Sep 2013
    Location
    Hamburg, Germany
    Posts
    894
    It's worth a try, then! I'd start by rewriting working SPI0 code for SPI1, see if there's anything on SPI1_DOUT, and then go for DMA.

  9. #9
    Yep, works! I added an spi1 branch to the StableWS2811 library that simply changes everything over to SPI1 on pin 0, including DMA.

Posting Permissions

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