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

Thread: ST7789_t3 library with non-hardware SPI port

  1. #1
    Junior Member
    Join Date
    Feb 2015
    Posts
    19

    ST7789_t3 library with non-hardware SPI port

    I'm trying to run 2 240x240 screens that don't have the CS pin.
    I can get 1 to run fine on the hardware SPI, but since they don't have CS pins, I was trying to use non hardware SPI pins.
    When I run the code, it hangs and eventually resets.
    It does this during the init call, which calls the commonInit() function.
    Using prints, I can trace the code all the way down to waitTransmitComplete()
    In there, when it executes the line
    _pimxrt_spi->CR = LPSPI_CR_MEN | LPSPI_CR_RRF; // Clear RX FIFO
    it hangs.
    So I guess the 1st question is can this library do a soft SPI port? (bit-bang)
    If so, what am I doing wrong, if not, are there other options to get 2 non-cs displays working?
    (another option would to put a mux on the spi clock pin and steer it to the display I want to write to)

  2. #2
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,760
    Quote Originally Posted by jhendrix View Post
    I'm trying to run 2 240x240 screens that don't have the CS pin.
    I can get 1 to run fine on the hardware SPI, but since they don't have CS pins, I was trying to use non hardware SPI pins.
    When I run the code, it hangs and eventually resets.
    It does this during the init call, which calls the commonInit() function.
    Using prints, I can trace the code all the way down to waitTransmitComplete()
    In there, when it executes the line
    _pimxrt_spi->CR = LPSPI_CR_MEN | LPSPI_CR_RRF; // Clear RX FIFO
    it hangs.
    So I guess the 1st question is can this library do a soft SPI port? (bit-bang)
    If so, what am I doing wrong, if not, are there other options to get 2 non-cs displays working?
    (another option would to put a mux on the spi clock pin and steer it to the display I want to write to)
    One you haven't mentioned what Teensy you are using. A T4.1 has 2 SPI ports you can use on the edge pins.

  3. #3
    Junior Member
    Join Date
    Feb 2015
    Posts
    19
    It's a 4.0, so I only have 1 without using the pads on the bottom.

  4. #4
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,760
    As far as I know there is no soft spi as you say. Might be able to use flex spi.

Posting Permissions

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