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

Thread: Custom SPI1 code on Teensy 3.5, has anyone bus-analysed 1st byte output in all modes?

  1. #1

    This thread is now removed from the Teensy forum.

    This thread is now removed from the Teensy forum.
    Last edited by Jasoroony; 01-18-2018 at 11:59 AM.

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,996
    One thing to try is to clear the FIFO's before sending the first data.

  3. #3
    This thread is now removed from the Teensy forum.
    Last edited by Jasoroony; 01-18-2018 at 11:58 AM.

  4. #4
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,996
    Quote Originally Posted by Jasoroony View Post
    Ah, yes - I do that (turn off FIFO & set the clear bits for RX and TX). It's SPI1 though - there is no FIFO. I thought I should not be setting that, but - no difference even when I try it without that. Thx tho.

    (Interesting though - isn't it.)
    OK,
    another operation I discussed earlier https://forum.pjrc.com/threads/27651...ll=1#post63419
    may be worthwhile to look at.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,446
    Quote Originally Posted by Jasoroony View Post
    The only thing I can think of is the initial clock polarity/setting is out of whack on first start.
    Maybe you could post a complete program which merely sends 1 byte every 10 ms, or something else very simple? Then we could actually run your code and watch with an oscilloscope or logic analyzer.

    Just to be clear, I am not going to do any sort of investigation on this unless you post a complete program. I'm not saying you're wrong or trying to deny any type of problem might exist. I'm just saying we get problem reports like this all the time, where no code is posted, no clear steps are given to reproduce the problem. They almost always turn out to not be reproducible, but coming that that not-so-productive conclusion takes quite a lot of time to create the test program, which ultimately doesn't recreate the issue.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,195
    Would also mention which display it is as who knows some one may have one of them and or could hopefully look at the specs...

    Maybe the device is trying to do some form of clock stretching or ... ?

  7. #7

    Retracting code.

    This thread is now removed from the Teensy forum.
    Last edited by Jasoroony; 01-18-2018 at 11:58 AM.

  8. #8
    This thread is now removed from the Teensy forum.
    Last edited by Jasoroony; 01-18-2018 at 11:58 AM.

  9. #9
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,518
    I've worked around it by sending that very first command mode byte twice in a row. This reliably makes everything work - at first power up, or during any hard or soft reset. Other than initially on first power-up, I never see any corruption on the display, so I'm fairly confident I've got all the timing right (believe me, it wasn't at first) along with the clock polarity etc. (and I know it works without this hack on other MCUs - so other than a few Teensy differences in how the SPI hardware works, the routines are basically correct).
    more likely your not deasserting the LCD during initialization is why your having problems “initially” on startup. no code, no lcd wiring pics, lack of details can only lead to lack of support...

    Tony

  10. #10
    This thread is now removed from the Teensy forum.
    Last edited by Jasoroony; 01-18-2018 at 11:58 AM.

  11. #11
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,518
    neednt deassert? you should read your own statements.

  12. #12
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,518
    neednt deassert is THE problem, but whatever, you seem brilliant in SPI...

  13. #13
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,518
    and no i didnt see your code, you can see thats a quote right? your response is self explanatory why this entire thread exists.

  14. #14
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,518
    ALSO, you DIDNT post code, NOR wanted to give LCD info, again, read YOUR OWN post.

  15. #15
    This thread is now removed from the Teensy forum.
    Last edited by Jasoroony; 01-18-2018 at 11:58 AM.

  16. #16
    Post reported as harassment.

  17. #17
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,592
    Quote Originally Posted by Jasoroony View Post
    Post reported as harassment.
    What's this??? Even after carefully reading this thread, I could not find any code and details in THIS thread which would compile when pasted in the Arduino IDE and allow EVERYBODY to reproduce the problem - a clear violation of our community standards. Yellow card for Jasoroony!

  18. #18
    This thread is now removed from the Teensy forum.
    Last edited by Jasoroony; 01-18-2018 at 11:58 AM.

  19. #19
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,518
    the “keyword” in last post today is “reset”. i suppose your not intelligent enough to know what a floating line on an spi bus does. i hope the harassment follows through, i wont need to look at your misconduct ever again.

  20. #20
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,592
    Apparently, they have a different idea of what is polite or not, in Australia.

    1) On top of every page in these forum, the forum rules are indicated in bold and red letters and there is no reason to feel harassed if that fact is mentioned or reminded.

    2) Common standards are that one doesn't blame Paul's excellent hardware, nor his excellent software and user support without sharing enough code and details which allow every forum member to reproduce the problem or bug.

    In addition, my personal opinion is that freshmen (people with less than 50 posts and which haven't yet shown helpful to the community by contributing libraries and/or helping others to solve their problems) should better take a rather humble attitude towards long-term Teensy users and forum contributors. Such a "users help users" forum (although Paul jumps in very often) can only be beneficial for everybody, when "giving" is in balance with "claiming".

    I will temporarily close this thread to give people time to rethink their behavior.
    Last edited by Theremingenieur; 01-18-2018 at 12:08 PM.

Posting Permissions

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