Project: SPI_MSTransfer

As a sanity check, I unpacked and flashed this to master, this is the up to date one containing the 5uS transfer16's thats been working with F&F all night without pausing, this was the last touch I did before I went to bed
It's still working fine
So try it on your master

Code:
[ATTACH]13811._xfImport[/ATTACH]

and im repushing the slave here thats from the other post, which is currently untouched since:
Code:
[ATTACH]13812._xfImport[/ATTACH]

EDIT: don't use LTO, I just tested Smallest with LTO and that one does pausing, Tim, is LTO still a code issue? :p

Mike, your slave code on Smallest compile is working great :)

Heres the LC size for it:
Code:
Sketch uses 23564 bytes (37%) of program storage space. Maximum is 63488 bytes.
Global variables use 4104 bytes (50%) of dynamic memory, leaving 4088 bytes for local variables. Maximum is 8192 bytes.
 
Last edited:
I using fastest. Was trying to stay away from any possible issue with that one. Anyway going to solder up a T3.6 tomorrow and test it to as a baseline. If it works then we will know for sure.

BTW> Using 10ms loops.
 
LTO is just a further HACK at optimization - it removes or duplicates and relocates code at LINK time AFAIK - it generally works. Except like all optimizations when it makes a bad call - or in optimizing alters code calling order or something.

IIRC : There are cases where broken code works when done LTO. It seemed that had to do with CLASS'y code that did stuff in constructors that otherwise was before the system was online - but I'm not recalling the specifics on that.
 
I using fastest. Was trying to stay away from any possible issue with that one. Anyway going to solder up a T3.6 tomorrow and test it to as a baseline. If it works then we will know for sure.

BTW> Using 10ms loops.

yup 10ms master loops, 500ms slave loops
Code:
  if ( !(millis() % 100) )  { teensy_gpio2.pinToggle(LED_BUILTIN); Serial.print("^LT"); delay(1); }
  if ( millis() - _timer >= [COLOR="#0000FF"]10)[/COLOR] {
    _timer = millis();
 
Just making sure I am on the same page. No soldering tonight - tomorrow I am going to try the 3.6 and see what happens.

EDIT: Interesting thing is though that there is a big delay on the T3.5 startup before it starts streaming to the slave, so much so that the slave transmits to the master a few records first:
Code:
C:\Users\CyberPalin\Desktop\LCmaster\LCmaster.ino May 15 2018 21:04:43
DBG: [S_CS 15] CB Capacity: 4 Length: 100
PacketID: 64554
Length: 20
AB BC D9 48 82 4C 5E 61 6D 99 16 34 25 56 3F B1 CE BF 38 A5 
PacketID: 42206
Length: 20
97 4E B2 15 82 AD 80 B8 6F 98 A5 DE 98 A4 A7 70 D8 65 C5 EB 
PacketID: 58380
Length: 20
95 D4 A9 D0 FE CE 70 43 DF 6A C0 1A 19 ED A7 41 F2 C4 AB 7C 
PacketID: 35050
Length: 20
5E 18 52 D9 22 9D 8B 46 AF 22 F2 45 B5 70 8D EA C9 2A 86 B2 
PacketID: 53476
Length: 20
7F 44 5C DF 6B B1 D6 EC DC 96 93 D9 42 62 27 3F B7 24 AD 34 
PacketID: 64942
Length: 20
4B 22 AD 48 A6 A8 C1 97 B4 47 DA 75 CF F5 E0 51 4E B0 6C 58 
PacketID: 26727
Length: 20
FB 64 16 B6 83 31 5A 3A EC 28 D7 DD 3E 2A 16 3D B6 B0 89 BD 
PacketID: 3313
Length: 20
C0 4D 19 D1 8C 31 BC 92 47 BF 29 ED 27 6C D6 3E CA 69 E9 85 
F&F (OT=0) OT_CALC==700  micros() _time==526
F&F (OT=0) OT_CALC==700  micros() _time==526
F&F (OT=0) OT_CALC==700  micros() _time==527
F&F (OT=0) OT_CALC==700  micros() _time==526
F&F (OT=0) OT_CALC==700  micros() _time==526
F&F (OT=0) OT_CALC==700  micros() _time==526
F&F (OT=0) OT_CALC==700  micros() _time==526
^LTF&F (OT=0) OT_CALC==700  micros() _time==526
F&F (OT=0) OT_CALC==700  micros() _time==528
F&F (OT=0) OT_CALC==700  micro
 
Adding the word labels to the pin numbers is good - I was going to mention that … but figured if I bothered to look at the code it would be there so.

How many of the T_3.x's work on T_3.2? I thought it had one good one and one crippled one but no 3rd one? Maybe the crippled one works for Slave use?
 
how many teensies work on 3.2 ? what? you lost me there :p

all spi busses are supported in slave mode with the latest MST slave, SPI,SPI1, and SPI2

however they require SPECIFIC pins to work, using other pins like the master does does not work. It took me a while to get those 4 pins working, they can be either default or alt
like in the case of SPI2 for example
ALT SCK53
DEF CS43
DEF MOSI44
DEF MISO45

where DEF is default on pinout card, and ALT is alternate pin on pinout card
To use SPI2 in slave mode, ONLY those pins would work, no others
 
how many teensies work on 3.2 ? what? you lost me there :p

all spi busses are supported in slave mode with the latest MST slave, SPI,SPI1, and SPI2

How many T_3.2's SPI bus ports are available? My card only shows one - and there is a second - but I thought it had issues and wasn't documented - it came up because the T_LC has two usable and the T_3.2 doesn't for Master at least.
 
Ahh okay, I never saw it either on the card, I presume it didnt exist, but if its anything like the 3.5/3.6, they all use same pins and registers, even for the slave spi protocol
 
I guess i could try to match the pinout as a SPI1 and see what happens? :)

EDIT, SPI1 is not declared in scope! Core lock me out ;(
 
ahh I can get the core to accept it, but I just remembered, SPI1 only worked with 4 pins on the 3.5/3.6

2 of which belonged to pin 31 (CS) and 32 (SCK)

datasheet claims SPI1 exists, as well as SPI0 and SPI1 both have 4 byte FIFO

As far as the registers are concerned, they are identical. Finding the pins would be the challenge, not configuring them, thats easy :p
 
Mike, take off your 5 second delay, thats your problem, I removed that here, the problem is while your master waits 5 seconds to start the slave already built up some queues, when master calls events() it flushes all the queues into the callback, which is normal behaviour :)

the 3.2 datasheet mentions nothing about SPI1, but the manual does
forum searching dictates theres no SCLK pin available on the 3.2, which doesnt help
The manual doesnt even list a pin for SPI1_CS in the pinout diagram, only 2 outs, 1 in, and 1 sclk,.. without the clock, and random pin guessing to see what works in slave mode, we're still lost on 3.2 spi1 slave mode:p
 
Last edited:
How does this look? :)
on T3.x
Code:
Teensy Online @ millis=570

C:\examples\slave\slave.ino May 15 2018 22:28:14
Cycle Counter Not Enabled :1942507590
Cycle Counter Enabled! :1942508113

SPI Slave pins connections:

		  Slave:		   Master:

		  CS    2 -------------->  CS
		  MOSI 11 -------------->  MOSI
		  MISO 12 -------------->  MISO
		  SCK  14 -------------->  SCK

on LC
Code:
Teensy Online @ millis=570

C:\examples\slave\slave.ino May 15 2018 22:28:14
Cycle Counter Not Enabled :1942507590
Cycle Counter Enabled! :1942508113

SPI Slave pins connections:

		  Slave:		   Master:

		  CS    2 -------------->  CS
		  MOSI 11 -------------->  [COLOR="#FF0000"]MISO[/COLOR]
		  MISO 12 -------------->  [COLOR="#FF0000"]MOSI[/COLOR]
		  SCK  14 -------------->  SCK

or maybe this?
Code:
Teensy Online @ millis=570

C:\examples\slave\slave.ino May 15 2018 22:36:03
Cycle Counter Not Enabled :3569545637
Cycle Counter Enabled! :3569546196

Teensy 3.2 Detected.

	Using SPI0 as slave, pin configuration:

		  Slave:		   Master:

		  CS    2 -------------->  CS
		  MOSI 11 -------------->  MOSI
		  MISO 12 -------------->  MISO
		  SCK  14 -------------->  SCK

and should we include the ARM cycle count as part of the slave code so it wont be needed in the sketch? I see you guys are using it alot

Example, with the cycle count integrated, setup now looks like this (with the output as above):

Code:
void setup() {
   slave.begin(SPI);
   slave.onTransfer(myCallback);
}
 
Last edited:
I kept seeing the cycle counter started … funny - you can remove that. If used it is part of the timing code setup - that was a test to see if I could detect it already running and not re-start it - though I'm not sure that hurts the running count.

Also notice the one original FF SLAVE code tested micros not millis for the setup() Serial while wait loop - I saw that but this is the first I'm mentioning it . . .


I have a working LIBRARY that traps many of the fault_isr's - only tested on broken memory test across boundary. I just added my ASSERT( true ) code that halts when it is not true and prints out info as we used it to trap NAN floats in the 9DOF code. I added a call from that to the fault() code to dump registers too.

Too late to clean it up and post tonight - but Tony you can revert your CORE files if you changed them.

Here is a teaser of the .h file - what is good, but easier to type than DebSet():
#ifndef _debug_t3_

#define _debug_t3_

#define qBlink() (GPIOC_PTOR = 32) // Pin13 on T3.x & LC // requires: pinMode(LED_BUILTIN, OUTPUT);

extern "C" void debug_fault( int iFrom );
extern "C" void DebSet( uint32_t a, uint32_t b );
extern "C" uint16_t DebState( uint16_t DoBlink );
extern "C" void assert_3(const char *__file, int __lineno, const char *__sexp );
#define assert_t3( a ) if (!a) { assert_3(__FILE__, __LINE__, #a); }

#endif
 
Morning all
Mike, take off your 5 second delay, thats your problem, I removed that here
Actually tried that last night. Fixed the startup sends from the slave but still had the problem with random delays between transfers (master and slave).

I downloaded the libs that you posted in #1651 and reflashed but to avail. As a sanity check I commented out the send section from the slave to the master. As you probably can guess absolutely no problem with just sends from the master to the slave. They just flyby no delays. Wiring doesn't seem to be the issue.

Will solder up the T3.6 after I finish my coffee as another sanity check.

How does this look?
I like either way but nice reminder.

should we include the ARM cycle count as part of the slave code so it wont be needed in the sketch
I agree with Tim, its not really needed. I just left it in as a sanity check for me to make sure the slave was on-line.
 
Mike, you sure your overriding the library files or IDE using correct ones?

i just got out of bed to go check now :)

its still scrolling like a maniac, callbacks working both ends :)

master sketch as-is:
Code:
#include <SPI.h>
#include <SPI_MSTransfer.h>
#include "A_ConfigDefines.h"

//#define SPI_SPEED 30500
#define SPI_SPEED 4000000
#define OT_CALC   100*(30000000/SPI_SPEED)

SPI_MSTransfer teensy_gpio = SPI_MSTransfer("Serial", SPI_MST_CS, &SPI_MST_BUS, SPI_SPEED ); // bad with default timeouts
SPI_MSTransfer teensy_gpio2 = SPI_MSTransfer("Serial", SPI_MST_CS, &SPI_MST_BUS, 300000 );

void yield() {}

void setup() {
  
  Serial.begin(115200);
  while (!Serial && millis() < 2000 ) {}
  Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
  teensy_gpio.debug(Serial);

  teensy_gpio2.onTransfer(myCallback);


#ifdef SPI_MST_SCK
  SPI_MST_BUS.setSCK( SPI_MST_SCK );
#endif
  SPI_MST_BUS.begin();
}

uint32_t OverTime = 0;
void loop() {
  static uint32_t _timer = millis();
  //static uint32_t _timer1 = micros();
  if ( !(millis() % 100) )  { teensy_gpio2.pinToggle(LED_BUILTIN); Serial.print("^LT"); delay(1); }
  if ( millis() - _timer >= 10) {
    _timer = millis();
    //_timer1 = micros();
    uint32_t _time = micros();
    
    uint16_t *buf;
    double MST_PrintVals[10];
    buf = (uint16_t *)MST_PrintVals;
    int ii = 0;
    static uint16_t __count = 0;
    static uint16_t __countB = 0;
    for ( uint32_t i = 0; i < sizeof(MST_PrintVals) / sizeof( MST_PrintVals[0]  ); i++ ) MST_PrintVals[i] = __count++;

    Serial.print("F&F (OT=");
    Serial.print( OverTime );
    Serial.print(")");
    _time = micros();

    __countB++;
    if ( __countB % 25 )
      teensy_gpio.transfer16((uint16_t *)MST_PrintVals, sizeof(MST_PrintVals) / 2, 60, 1); // DEBUGHACK output
    else
      teensy_gpio.transfer16((uint16_t *)MST_PrintVals, sizeof(MST_PrintVals) / 2, 55, 1);

    _time = micros() - _time;
    Serial.print(" OT_CALC==");
    Serial.print(OT_CALC);
    Serial.print("  micros() _time==");
    Serial.println(_time);
    if ( _time > OT_CALC ) OverTime++;
  }

  teensy_gpio2.events();
}

void myCallback(uint16_t *buffer, uint16_t length, AsyncMST info) {
  Serial.print("PacketID: "); Serial.println(info.packetID);
  Serial.print("Length: "); Serial.println(length);
  for ( uint16_t i = 0; i < length; i++ ) {
    Serial.print(buffer[i], HEX); Serial.print(" ");
  }
  Serial.println();
}

slave sketch as-is:
Code:
#define __SLAVE__ 1
#include <SPI_MSTransfer_Slave.h>

void setup() {
  //  Serial.begin(115200);


  slave.begin(SPI);
  slave.onTransfer(myCallback);
  //    pinMode(21, OUTPUT);

  //  delay(1000);
  //#if defined(__MK20DX256__)
  //  Serial.print("\nTeensy 3.2 Detected.\n");
  //#endif
  //  Serial.print("\n\tUsing SPI0 as slave, pin configuration:\n\n\t\t  Slave:\t\t   Master:\n\n");
  //  Serial.print("\t\t  CS    2 -------------->  CS\n");
  //  Serial.print("\t\t  MOSI 11 -------------->  MOSI\n");
  //  Serial.print("\t\t  MISO 12 -------------->  MISO\n");
  //  Serial.print("\t\t  SCK  14 -------------->  SCK\n");

  //                 CS,11,12,14");

}

void loop() {
  //    delay(100);
  //    digitalWrite(21, !digitalRead(21));
  //    Serial.println(GPIOD_PDIR);
  //  return;
  static uint32_t _timer1 = millis();
  static uint32_t _timer2 = millis();
  if ( millis() - _timer2 > 500 ) {
    _timer2 = millis();
    uint16_t buf[20];
    for ( uint16_t i = 0; i < 20; i++ ) buf[i] = random(0x1000, 0xFFFF);
    slave.transfer16(buf, 20, random(1, 65534));
    //    slave.transfer16(buf, 20, 55);
  }
  slave.events();
}

static uint16_t last_packetID = 0;
elapsedMillis TogClk;
uint32_t TogCnt = 0;
uint32_t FaFCnt = 0;
void myCallback(uint16_t *buffer, uint16_t length, AsyncMST info) {
  if ( 55 == info.packetID ) {
    if ( 40 != length ) {
      Serial.print("Bad Length: "); Serial.println(length); // If this shows then the SPI Passed array size is nor wrong
    }
    else if ( 0 != info.error ) {
      Serial.println("\nBad CRC: ");
    }
    else {
      double* MST_PrintVals;
      MST_PrintVals = (double *)buffer;

      for (int i = 0; i < 10; i++) {
        Serial.print(MST_PrintVals[i]); Serial.print("  ");
      }
      Serial.println();
    }
  }

  else if ( 60 == info.packetID ) {
    if ( 40 != length ) {
      Serial.print("Bad Length: "); Serial.println(length); // If this shows then the SPI Passed array size is nor wrong
    }
    else if ( 0 != info.error ) {
      Serial.println("\nBad CRC: ");
    }
    else {
      double* MST_PrintVals;
      MST_PrintVals = (double *)buffer;

      // This provides a terse output with error checked based on MASTER output to the 12 DOUBLE value Array
      {
        static uint16_t TogLast = 0;
        static uint16_t TogHz = 0;
        static uint16_t FaFHz = 0;
        static double LastVal = 100000;
        static uint32_t ChkErr = 0;
        static uint32_t CBcount = 0;
        //if ( digitalReadFast( LED_BUILTIN) != TogLast ) {
        //  TogLast = !TogLast;
        //  TogCnt++;
        //}
        if ( TogClk >= 1000 ) {
          TogClk -= 1000;
          TogHz = TogCnt;
          TogCnt = 0;
          FaFHz = FaFCnt;
          FaFCnt = 0;
        }
        if ( last_packetID != info.packetID ) {
          LastVal += 10;
          if ( LastVal > 65536 && LastVal < 100000 ) LastVal -= 65536;
        }
        elapsedMillis LastCB;
        double DiffMiss = 0;
        uint32_t ErrSeen = 0;
        CBcount++;
        FaFCnt++;
        for ( uint32_t ii = 0; ii < 10; ii++ ) {
          LastVal++;
          if ( 65536 == LastVal ) LastVal = 0;
          if ( LastCB > 10 || 100001 == LastVal || 100013 == LastVal ) LastVal = MST_PrintVals[ii];
          if ( LastVal != MST_PrintVals[ii] ) {
            DiffMiss = LastVal - MST_PrintVals[ii];
            ChkErr++;
            Serial.print("\nBad LASTVAL TEST INCREMENT <<<<<<<<<<<<<<<<<<<< DIFF OF> ");
            Serial.println( DiffMiss );
            LastVal = MST_PrintVals[ii];
            ErrSeen++;
          }
          if ( 0 != ErrSeen || 1 > ii ) {
            Serial.print( MST_PrintVals[ii] );
            Serial.print(",");
          }
          else {
            Serial.print(" #,");
          }
        }
        Serial.print( CBcount );
        Serial.print(",");
        Serial.print( ChkErr );
        Serial.print(" [");
        Serial.print( FaFHz );
        Serial.print(" ,");
        Serial.print( TogHz );
        Serial.println();
        LastCB = 0;
      }

    }
  }
  else {
    Serial.print("PacketID: ");
    Serial.println(info.packetID);
  }
  last_packetID = info.packetID;
}
 
This is the startup of the slave now:

Code:
	Teensy 3.2 Detected.

	Using SPI0 as slave, pin configuration:

		  Slave:		   Master:

		  CS    2 -------------->  CS
		  MOSI 11 -------------->  MOSI
		  MISO 12 -------------->  MISO
		  SCK  14 -------------->  SCK

Bad LASTVAL TEST INCREMENT <<<<<<<<<<<<<<<<<<<< DIFF OF> 89743.00
10268.00,10269.00,10270.00,10271.00,10272.00,10273.00,10274.00,10275.00,10276.00,10277.00,1,1 [0 ,0
10278.00, #, #, #, #, #, #, #, #, #,2,1 [0 ,0
10288.00, #, #, #, #, #, #, #, #, #,3,1 [0 ,0
10298.00, #, #, #, #, #, #, #, #, #,4,1 [0 ,0
10308.00, #, #, #, #, #, #, #, #, #,5,1 [0 ,0
10318.00, #, #, #, #, #, #, #, #, #,6,1 [0 ,0
10328.00, #, #, #, #, #, #, #, #, #,7,1 [0 ,0
10338.00, #, #, #, #, #, #, #, #, #,8,1 [0 ,0
10348.00, #, #, #, #, #, #, #, #, #,9,1 [0 ,0
10358.00, #, #, #, #, #, #, #, #, #,10,1 [0 ,0
10368.00, #, #, #, #, #, #, #, #, #,11,1 [0 ,0
10378.00, #, #, #, #, #, #, #, #, #,12,1 [0 ,0
10388.00, #, #, #, #, #, #, #, #, #,13,1 [0 ,0
10398.00, #, #, #, #, #, #, #, #, #,14,1 [0 ,0
10408.00, #, #, #, #, #, #, #, #, #,15,1 [0 ,0
10418.00  10419.00  10420.00  10421.00  10422.00  10423.00  10424.00  10425.00  10426.00  10427.00  
10428.00, #, #, #, #, #, #, #, #, #,16,1 [0 ,0
10438.00, #, #, #, #, #, #, #, #, #,17,1 [0 ,0
10448.00, #, #, #, #, #, #, #, #, #,18,1 [0 ,0
10458.00, #, #, #, #, #, #, #, #, #,19,1 [0 ,0
10468.00, #, #, #, #, #, #, #, #, #,20,1 [0 ,0
10478.00, #, #, #, #, #, #, #, #, #,21,1 [0 ,0
10488.00, #, #, #, #, #, #, #, #, #,22,1 [0 ,0
10498.00, #, #, #, #, #, #, #, #, #,23,1 [0 ,0
10508.00, #, #, #, #, #, #, #, #, #,24,1 [0 ,0
10518.00, #, #, #, #, #, #, #, #, #,25,1 [0 ,0
10528.00, #, #, #, #, #, #, #, #, #,26,1 [0 ,0
10538.00, #, #, #, #, #, #, #, #, #,27,1 [0 ,0
10548.00, #, #, #, #, #, #, #, #, #,28,1 [0 ,0
10558.00, #, #, #, #, #, #, #, #, #,29,1 [0 ,0
10568.00, #, #, #, #, #, #, #, #, #,30,1 [0 ,0
10578.00, #, #, #, #, #, #, #, #, #,31,1 [0 ,0
10588.00, #, #, #, #, #, #, #, #, #,32,1 [0 ,0
10598.00, #, #, #, #, #, #, #, #, #,33,1 [0 ,0
10608.00, #, #, #, #, #, #, #, #, #,34,1 [0 ,0
10618.00, #, #, #, #, #, #, #, #, #,35,1 [0 ,0
10628.00, #, #, #, #, #, #, #, #, #,36,1 [0 ,0
10638.00, #, #, #, #, #, #, #, #, #,37,1 [0 ,0
10648.00, #, #, #, #, #, #, #, #, #,38,1 [0 ,0
10658.00, #, #, #, #, #, #, #, #, #,39,1 [0 ,0
10668.00  10669.00  10670.00  10671.00  10672.00  10673.00  10674.00  10675.00  10676.00  10677.00  
10678.00, #, #, #, #, #, #, #, #, #,40,1 [0 ,0
10688.00, #, #, #, #, #, #, #, #, #,41,1 [0 ,0
10698.00, #, #, #, #, #, #, #, #, #,42,1 [0 ,0
10708.00, #, #, #, #, #, #, #, #, #,43,1 [0 ,0
10718.00, #, #, #, #, #, #, #, #, #,44,1 [0 ,0
10728.00, #, #, #, #, #, #, #, #, #,45,1 [0 ,0
10738.00, #, #, #, #, #, #, #, #, #,46,1 [0 ,0
10748.00, #, #, #, #, #, #, #, #, #,47,1 [0 ,0
10758.00, #, #, #, #, #, #, #, #, #,48,1 [0 ,0
10768.00, #, #, #, #, #, #, #, #, #,49,1 [0 ,0
10778.00, #, #, #, #, #, #, #, #, #,50,1 [0 ,0
10788.00, #, #, #, #, #, #, #, #, #,51,1 [0 ,0
10798.00, #, #, #, #, #, #, #, #, #,52,1 [0 ,0
10808.00, #, #, #, #, #, #, #, #, #,53,1 [0 ,0
10818.00, #, #, #, #, #, #, #, #, #,54,1 [0 ,0
10828.00, #, #, #, #, #, #, #, #, #,55,1 [0 ,0
10838.00, #, #, #, #, #, #, #, #, #,56,1 [0 ,0
10848.00, #, #, #, #, #, #, #, #, #,57,1 [0 ,0
10858.00, #, #, #, #, #, #, #, #, #,58,1 [0 ,0
10868.00, #, #, #, #, #, #, #, #, #,59,1 [0 ,0
10878.00, #, #, #, #, #, #, #, #, #,60,1 [0 ,0
10888.00, #, #, #, #, #, #, #, #, #,61,1 [0 ,0
10898.00, #, #, #, #, #, #, #, #, #,62,1 [0 ,0
10908.00, #, #, #, #, #, #, #, #, #,63,1 [0 ,0
10918.00  10919.00  10920.00  10921.00  10922.00  10923.00  10924.00  10925.00  10926.00  10927.00  
10928.00, #, #, #, #, #, #, #, #, #,64,1 [0 ,0
10938.00, #, #, #, #, #, #, #, #, #,65,1 [0 ,0
10948.00, #, #, #, #, #, #, #, #, #,66,1 [0 ,0
10958.00, #, #, #, #, #, #, #, #, #,67,1 [0 ,0
10968.00, #, #, #, #, #, #, #, #, #,68,1 [0 ,0
10978.00, #, #, #, #, #, #, #, #, #,69,1 [0 ,0
10988.00, #, #, #, #, #, #, #, #, #,70,1 [0 ,0
10998.00, #, #, #, #, #, #, #, #, #,71,1 [0 ,0
11008.00, #, #, #, #, #, #, #, #, #,72,1 [0 ,0
11018.00, #, #, #, #, #, #, #, #, #,73,1 [0 ,0
11028.00, #, #, #, #, #, #, #, #, #,74,1 [0 ,0
11038.00, #, #, #, #, #, #, #, #, #,75,1 [0 ,0
11048.00, #, #, #, #, #, #, #, #, #,76,1 [0 ,0
11058.00, #, #, #, #, #, #, #, #, #,77,1 [0 ,0
11068.00, #, #, #, #, #, #, #, #, #,78,1 [0 ,0
 
Give me a little bit - going to start with clean libraries - going to completely delete the lib and re-set it up. In the middle of something that I have to finish.

The only real difference I see in your slave versus mine is:
Code:
#define __SLAVE__ 1

Are you using this in lieu of the constructor? Is it needed?

EDIT:
startup of the slave now:
Nice :)
 
Ok - couldn't wait to try it. I deleted the existing files and used the two libs in p#1651. Reflashed master and slave - still doing the same thing.

Don't go crazy just yet - let me do some tests with the 3.6 when I get it - can't find what I did with mine so I ordered another from Amazon - more money but I will get it this afternoon.
 
haha maybe you got too much interference where you are bugging your digital lines :D
dont forget to try swapping the 11 & 12 wires just in case, im still using pin0 on 3.2 as GND to 3.6 SPI2 GND port direct

in the meantime, heres the startup config page update for the 3.x/lc

Code:
[ATTACH]13817._xfImport[/ATTACH]

whats good is if the user doesnt have it connected, that will be left on the console for them to see

We could do a smart console popup, where if the user doesnt open console, he opens it 10 secs later, itll display once, this would require a bool to check the state of console on startup, and disable it on console print whenever the console is opened

Oh yeah I think this glimpses over our heads for awhile now
I'm using IDE 1.8.5 with Teensyduino 1.4.2 Beta3 :)
T3.2 using Faster at 96MHz
T3.6 using Faster at 180MHz
 
Last edited:
Yeah - we keep forgetting about the ide. I started using IDE 1.8.5 with Teensyduino 1.4.2 Beta4 just to get used to it.

For me I been:
T3.2 at 96Mhz
T3.5 at 168Mhz
both set for faster.

Yep had to swap 11/12 on the lc to get it to work. But I will swap them back just for the heck of it.
 
Yeah the LC is cross-connected
3.x series are all direct connected

Code:
LC                  T3.x

MISO --------------> MOSI
MOSI --------------> MISO


T3.x                T3.x

MISO --------------> MISO
MOSI --------------> MOSI

I also made the console printouts show it :)
 
Back
Top