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

Thread: Teensy 4.0 spi sck interference

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    11

    Teensy 4.0 spi sck interference

    Using a teensy 4 I have tested a breadboard circuit with 3 spi slaves and replicated the connections on a perfboard.
    On the breadboard everithing works as supposed but on the perfboard something is interfiring with sck: two connectors works fine but if I try to connect a cable to the third spi bus became inutilizable.
    Connecting a lose cable to sck on that connector and touching it break everithing.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,271
    It sounds like you might have some accidental solder bridges. Those can be hard to track down, particularly if they are bridges that are temporary depending on the pressure of the board.

    Just to be sure, did you wire in pull-up resistors for the 3 CS pins? This helped me and it came from: https://www.pjrc.com/better-spi-bus-design-in-3-steps/.

  3. #3
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    5,434
    I am thinking of doing a PR to SPI, to change how the pins are configured. You might try it and see if this helps you:

    In SPI.cpp at about line 1283, will be a line that looks like:
    Code:
    uint32_t fastio = IOMUXC_PAD_SRE | IOMUXC_PAD_DSE(3) | IOMUXC_PAD_SPEED(3);
    try changing it to:
    Code:
    uint32_t fastio = IOMUXC_PAD_DSE(6) | IOMUXC_PAD_SPEED(1);
    If I understand correctly this should give it more drive strength, but may not be able to drive the speed as high, but probably fast enough...

    It helped with some of the displays we have been playing with.

  4. #4
    Junior Member
    Join Date
    Aug 2019
    Posts
    11
    Quote Originally Posted by KurtE View Post
    I am thinking of doing a PR to SPI, to change how the pins are configured. You might try it and see if this helps you:

    In SPI.cpp at about line 1283, will be a line that looks like:
    Code:
    uint32_t fastio = IOMUXC_PAD_SRE | IOMUXC_PAD_DSE(3) | IOMUXC_PAD_SPEED(3);
    try changing it to:
    Code:
    uint32_t fastio = IOMUXC_PAD_DSE(6) | IOMUXC_PAD_SPEED(1);
    If I understand correctly this should give it more drive strength, but may not be able to drive the speed as high, but probably fast enough...

    It helped with some of the displays we have been playing with.
    Wow, that fixed the problem like black magic.

Posting Permissions

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