Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • DougMcK's Avatar
    04-01-2020, 02:31 PM
    DougMcK replied to a thread TSPISlave Library in Project Guidance
    Yes, I understand the issues with the while loop and clocking out the data. That's all working fine in my real program. (My test was just a very stripped down example. ) I guess there's just no way to clear out that...
    5 replies | 500 view(s)
  • DougMcK's Avatar
    03-31-2020, 11:23 PM
    DougMcK replied to a thread TSPISlave Library in Project Guidance
    Thanks for the reply. (volatile uint8_t i fixed). I'm not sure I follow. Are you saying that the first byte of the slave message should always be ignored? That seems a bit surprising. I get that this is usually...
    5 replies | 500 view(s)
  • DougMcK's Avatar
    03-31-2020, 08:55 PM
    DougMcK replied to a thread TSPISlave Library in Project Guidance
    This library has been helpful to me, thanks! But, I'm unable to get past some behavior related tolatency. Here's what I'd like to do: The master sends the slave a command. The slave processor does stuff with it...
    5 replies | 500 view(s)
  • DougMcK's Avatar
    03-28-2020, 04:41 PM
    @KurtE No doubt there's a lot of confusion, and I certainly get confused. But, my point is that there *are* devices that implement MISO and MOSI, but this isn't one of them... MISO and MOSI are perfectly respectable...
    7 replies | 115 view(s)
  • DougMcK's Avatar
    03-28-2020, 01:41 AM
    What you say is fine, if the Teensy is being used in Master mode and, like I said, in the Arduino/Teensy world the Arduino/Teensy is usually the master. But if the Teensy is being used in Slave mode then data should...
    7 replies | 115 view(s)
  • DougMcK's Avatar
    03-27-2020, 05:45 PM
    Yes, but a pin that is SDO in *both* master and slave mode is neither MOSI nor MISO. These are not just different, synonymous, names for the same thing. I also understand that most people use the Arduino/Teensy as...
    7 replies | 115 view(s)
  • DougMcK's Avatar
    03-27-2020, 05:01 PM
    Greetings! I've been learning about SPI in slave mode for the Teensy 3.6. I've been making some progress with Tonton81's libraries (TSPISlave and SPI_MSTransfer) and there's some discussion about this issue here...
    7 replies | 115 view(s)
  • DougMcK's Avatar
    03-27-2020, 05:47 AM
    Right, post 1839 didn't mention LC, and indeed I'm only looking at T 3.6 and the reference manual for the MK66. I only mentioned the LC because Tonton did, and I remembered from Tonton's readme for TSPISlave that the LC...
    1848 replies | 134340 view(s)
  • DougMcK's Avatar
    03-27-2020, 03:55 AM
    Sorry, I don't think I follow. I realize the LC is different from T3 and I thought the LC is correct. Having data flow into a pin labelled MISO while in slave mode is just perverse. No aspersions are being cast on your...
    1848 replies | 134340 view(s)
  • DougMcK's Avatar
    03-27-2020, 03:49 AM
    Maybe I've answered my own question. MK66 Pin PTE1 and PTE3 can have their SPI1_SIN and SPI1_SOUT functions exchanged, BUT the Teensy 3.6 uses MK66 pins PTB16 and PTB17 for SPI1 data, and it looks like these cannot...
    1848 replies | 134340 view(s)
  • DougMcK's Avatar
    03-27-2020, 03:31 AM
    Right, I think we are saying the same thing. In this implementation MISO goes to MOSI and MOSI goes to MISO. pins 11 -> 12 and 12 -> 11. In normal SPI MISO goes to MISO and MOSI goes to MOSI. Doug
    1848 replies | 134340 view(s)
  • DougMcK's Avatar
    03-27-2020, 03:14 AM
    I hope this question isn't too off-topic, but this thread likely is inhabited by people who know the answer (eg tonton81). I gather that the connections between Teensy's needs to be MISO -> MOSI and MOSI -> MISO. ...
    1848 replies | 134340 view(s)
  • DougMcK's Avatar
    03-27-2020, 12:02 AM
    Frank, yes, I agree it looks correct now in my testing too. I'm not really using T4 SPI, but I'm glad my observation may have helped you fix something. Thanks very much, Doug
    18 replies | 154 view(s)
  • DougMcK's Avatar
    03-26-2020, 10:46 PM
    I was just looking at the NXP MK66 datasheet, because I'm really more focused on the T3.6 SPI interface for now. The spec for data setup time is 15.8nS, so that timing shown in your figure is right on the edge, even for...
    18 replies | 154 view(s)
  • DougMcK's Avatar
    03-26-2020, 10:04 PM
    Yikes! While that might work ok in many environments it looks to me like it's being timed from the wrong edge...
    18 replies | 154 view(s)
  • DougMcK's Avatar
    03-26-2020, 10:00 PM
    Hmm, I can't see your attachment...
    18 replies | 154 view(s)
  • DougMcK's Avatar
    03-26-2020, 09:40 PM
    I reproduced your example, but try sending 0x70 instead. I think that shows the problem.
    18 replies | 154 view(s)
  • DougMcK's Avatar
    03-26-2020, 06:54 PM
    Greetings! I've been diving into SPI recently and I wonder if I may have found a bug with the SPI library as implemented for the T4? In SPI mode 0 the data are sampled on the rising edge of the clock. So, data...
    18 replies | 154 view(s)
No More Results
About DougMcK

Basic Information

Statistics


Total Posts
Total Posts
48
Posts Per Day
0.04
Last Post
TSPISlave Library 04-01-2020 02:31 PM
General Information
Last Activity
04-01-2020 10:12 PM
Join Date
03-15-2017