Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 74 FirstFirst ... 2 3 4 5 6 14 54 ... LastLast
Results 76 to 100 of 1838

Thread: Project: SPI_MSTransfer

  1. #76
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,702
    Ok - hooked everything up and used Tim's defines and sketches. Using 2 T3.5's and its working like a charm. Didn't do any timings though just wanted to make sure I had the connections right . Have to go back and read through the thread.

  2. #77
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    mjs513, feel free to abuse timings like me, stability is good when growing a project like this

    I tried spi line terminations but no success, it's coping though whatever we throw at it which is great tho, but it does a good job guarenteeing the full array ive been throwing at it, of over 10K Dwords during previous tests

    I didnt do much today other than rewrite the print* methods and bump the SPISettings to 48000000, still alot of work ahead to follow

    It would be nice to have buffered writes though, teensy has uint8_t buffered writes for SPI but I dont see any methods for transferring 16 bit arrays
    I guess thats something custom to be made, the actual speed improvement could possibly be in that implementation
    We could easily then just send the internal buffer directly into the method for transfer without calling transfer16 for every Dword
    Not sure what kind of performance difference it may make, or not worth the hastle, who knows

    defragster, im currently testing the resends in 50ms timeouts rather than 100, so far it hasnt gone total psycho on me even tho it gets the occasional resent of about 1 time every few commands, especially now at 48mhz
    reducing it to have will have the resend timeout be lower by that amount of time, so it might be actual savings in processing time, the speed of the SPI much be way faster than that threshold
    Last edited by tonton81; 02-27-2018 at 05:24 PM.

  3. #78
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,702
    tonton81. What you have done in such a short time is amazing. You need to take come up and catch your breath. When I get the window I will probably move over defragster's timing routine that we use in the other thread and see what happens but more than likely will probably do that when it gets incorporated into the kalman filter. Think that will be the stress test.

  4. #79
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    awesome

  5. #80
    Senior Member
    Join Date
    Dec 2013
    Posts
    220
    Perhaps this is a dumb question, is it possible to run T3.6 as slave @ 30 megahertz SPI if the F_BUS is running @ 120 megahertz ?.

  6. #81
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    defragster:
    Looking good ... Had time to make the prototype work: micros() _time==33 for 12 Dword transfer!
    really? Check me out now
    75MHz, 12 Dwords == 19uS F&F
    75MHz, 60 Dwords == 59uS F&F



    Code:
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 14
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 27
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 27
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 27
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 27
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    60
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 14
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    60
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 13
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    58
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    58
    d: 26
    p: 13
    returned value 55
    59
    PacketID: 55
    Length: 5
    1 2 3 4 5 
    d: 26
    p: 13
    returned value 55
    60
    d: 25
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    58
    d: 26
    p: 12
    returned value 55
    59
    d: 25
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59
    d: 26
    p: 12
    returned value 55
    59
    d: 26
    p: 13
    returned value 55
    59

  7. #82
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    25 for toggle and 12 pinmode! and WHATS THIS? NO ERRRORS? WTF! lol

    edit, just saw ONE pass resend pass

    okay, maybe occasionallyy

    hey maybe its a frequency issue
    im surprised 75000000 is working with spisettings
    does SPISettings limit a max or at least return an error if not supported? heh

    426uS for a 500 byte buffer to goto slave's callback F&F! (im using SPI_TRANSACTION SPISettings(100000000, MSBFIRST, SPI_MODE0) ) (100MHz)

    for 12 Dwords @ 100MHz I still get 19uS...
    Last edited by tonton81; 02-27-2018 at 09:30 PM.

  8. #83
    Senior Member
    Join Date
    Dec 2013
    Posts
    220
    ?
    The highest SPI speed you can get is 60mhz, this is on teensy 3.6 runnning @240mhz with F_BUS speed set @120mhz .

  9. #84
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    then SPISettings has no error output, ill just presume it downclocks to max, I guess im running 60, probably, but i have no scope

  10. #85
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    Even at 60mhz i still achieve 19uS for 12 Dwords awesome, so we're getting maximum throughput, so far (unless someone works on dma)

  11. #86
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,063
    It is based on F_BUS multiplier. Starts comparing requested clock at F_BUS/2 then /4 then /6 then ... until one works. Requested clock is a suggestion - and it settles on what can work.

    Default 240 MHz F_BUS is 60 - can be set up to 120 OverClocked in ...\hardware\teensy\avr\cores\teensy3\kinetis.h - about line 770.

  12. #87
    Senior Member
    Join Date
    Dec 2013
    Posts
    220
    I am assuming you did edit this in kinetis.h

    #if (F_CPU == 240000000)
    #define F_PLL 240000000
    #ifndef F_BUS
    //#define F_BUS 60000000
    //#define F_BUS 80000000 // uncomment these to try peripheral overclocking
    #define F_BUS 120000000 // all the usual overclocking caveats apply...
    #endif

  13. #88
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    yup, plus i believe the slave is ran slower than the master as usual

    no chris, i havnt

  14. #89
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,063
    tonton81 - I integrated the Master to Slave Transfer in the other thread, it is doing what I tell it - but I need to handle the variable size/type better to replicate the output function.

    ONE PROBLEM: "virtual void assert();"

    Conflicted so I made it "virtual void MST_assert();" To get it to compile.

    Also For some reason I need to find the Slave is popping out an unexpected '55' ( packet ID ) and also a newline. { I'm using version 0.0.4 }

  15. #90
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    took me a bit to understand conflict then realized you prolly have a similar function, confused me a bit

    although i dont see how it could conflict if its in a different namespace? (what was wrong with assert?)
    Last edited by tonton81; 02-28-2018 at 08:05 AM.

  16. #91
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    you had a problem woth ids? floats? would you like a float input in your callback? im not clear on that post :P

    0.0.4 has no serial functions, if your getting new lines in ur prints check your handler, maybe you got a ln in there, or your array has a newline

    we could add more data types if necessary while its still in infancy state to the callbacks, so less conversion for you

  17. #92
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,063
    The Master code used floats - actually they seem to be doubles - variables are globals and not apparent where defined across the project - thought I'd let the compiler tell me ... Assigned to an uint32_t array and the compiler didn't complain - but they are doubles. I just need to make a struct shared on both ends of proper types - pass the struct # of bytes - receive it into the same struct and all will be well. Transfer lib need to do anything special.

    The Master INO code is one of 10 INO's in the folder - the header is pulled in. Apparently in the fashion the IDE pulls all INO's together - into a single 'cpp' file - the distinction is lost - when it got to the linker? Dunno - seeing assert() kept giving me pause as I read the code too - as assert is something else globally defined. I'd rename to SPIassert or something descriptive ( same with deassert since it is paired ) - except I hacked on MST_ just to see it work and would know if it worked by name.

    That is the compiler letting us down twice . . . But the transfer works well and fast. Offloads the USB to the SLAVE that handles it alone just fine - and frees up the main USB to program and do faster debug output than UART Serial#.

  18. #93
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    i never knew there was a conflict ill rename both in v5 for testing

    yeah the structs would have to be identical when sending them as Dword and rebuilding to get the same format as your host

  19. #94
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,063
    Are you close to a new version? Before I share it on the other thread I should make sure I'm close to your current version so I don't have to rewrite.

  20. #95
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    only v5 which includes the new print/println methods that take advantage of a single transaction buffered write and have access to all 7 slave uarts (including usbserial)

    ill prolly be back home in another 8 hours, so im stuck in chat mode

  21. #96
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    post #59 contains v5, post #74 contains patched print(ln) methods you can change, plus your assert/deassert method name change

    btw you mentioned assert gave you a pause, did the change fix it? no more pauses?

  22. #97
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,063
    I pulled that V0.0.5 - but not using it since I just needed the F&F and had it working in test. If you repost I can move to that with your chosen rename of assert()

    I checked the lib and saw no .print( packetID ) - and I checked the Slave code .... I missed it ... I have a check for length =24 and print after checking and printing packetID if NOT 55 with text string . . . otherwise I process the packet. ... maybe it's the compiler again

  23. #98
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,063
    Any Chance there is an easy edit to give a unique Error PacketID# I can pull to notify when the Slave gets garbage? Otherwise the F&F could be on bad wires and I can't tell.

  24. #99
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,025
    it captures before the crc so its saved anyways, just tell me what you want and ill make it done
    you want perhaps a uint8_t flag for the error where 0 == pass and 1 == CRC fail and 2......etc let me know
    if thats the case, ill allow the payload to goto callback and you can handle it yourself?

  25. #100
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,063
    Put the payload in queue - but give it a known ERROR packet ID? That will make it easy to pull and handle - the packet ID may be a byte that is corrupted - so using that with error bit could go wrong it seems.

    I won't try to use the data for anything - just want to be aware when one gets skipped. That goes to the Static Packet Errors tracking I was trying to describe. For failures of a detectable type you could put a pointer to , or copy of, that in the queue. One field there in the static area would be a count you'd increment for any point of failure. Then if problems show up you'd have a record of the errors to know where to look.

Posting Permissions

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