Teensy 4.1 compilation on Max PCB3 vs MaxPCB36 #onstepx #arduino #configuration #ds3231


Antoine Cesbron
 

H All, 

I'm new to OnStep, and like to use it on my setup (parts are shipped) :
1x-Teensy 4.1 16mb (received)
1x-DS3231
1x-D1-Mini-Pro 16mb
1x-HC-06
3x-TMC5160 v1.3
OnStepX
All will be on my own PCB

In Constants.h, I saw :
#define MaxPCB3                     10     // improved third generation for alum. case, Teensy4.1
So, I started with it and it compile well for Teensy 4.1.
Even if // Pin map for OnStep MaxPCB 3.0 and 3.5 (Teensy3.5/3.6) and not Teeny 4.1 is labeled in Pins.MaxPCB3.h. 

After some reading, I saw that MaxPCB36 seems to be more "dedicated" to Teensy 4.1.
And it's noticed // Pin map for OnStep MaxPCB 3.6 Teensy4.1 PCB in Pins.MaxPCB36.h.

So I restart with it.
I had to add #define MaxPCB36                    11     // improved third generation for Teensy4.1 in Constant.h.

But compilation fail on  TIME_LOCATION_PPS_SENSE  HIGH   in Config.h:
OnStepX\src\lib\tls\PPS.h:12:4: error: #error "Configuration (Config.h): PPS_SENSE_PIN must be defined for TIME_LOCATION_PPS_SENSE ON"
   #error "Configuration (Config.h): PPS_SENSE_PIN must be defined for TIME_LOCATION_PPS_SENSE ON

It compile only with TIME_LOCATION_PPS_SENSE  OFF  , but the DS3231 will provide the PPS, so it should be HIGH or LOW but not OFF.

I still have not the hardware to check if it work, only the Teensy 4.1 for now, but anticipation permit me to learn about OnStep.
May you please point me to the right direction?
Thanks.
 


Howard Dutton
 

On Mon, Sep 26, 2022 at 02:13 AM, Antoine Cesbron wrote:
In Constants.h, I saw :
#define MaxPCB3                     10     // improved third generation for alum. case, Teensy4.1
So, I started with it and it compile well for Teensy 4.1.This is where you should have stopped.
Don't change the source and use MaxPCB3 as indicated for the MaxPCB3.6.

The 3.0 and 3.5 are obsolete.


Antoine Cesbron
 

Is it normal that Teensy 4.1 compilation require SQUARE Step wave form ?
#error "Configuration (Config.h): Setting STEP_WAVE_FORM SQUARE is required for the Teensy4.0 and 4.1"

I was trying to set it to PULSE to get faster steps rates.
Thanks.


George Cushing
 

It would seem that with a 600MHz clock the 4.1 will be no faster in pulse than square. 

Looking at the MaxPBC3.6 board I note that there is no connection for the DS3132's 32K (PPS) pin. That would explain your error.


George Cushing
 

Take that back the PPS is routed to the Teensy and pin 14 of the DB-15.

OnStep on a business card?


Antoine Cesbron
 

Yes, that's right, 

On "Pins.MaxPCB36.h", PPS in on Teensy's Pin 20, that is also AUX2_PIN and AUX2_PIN is on PIN 14 of the DB-15 connector.
That's confirm that PPS can be used on MaxPCB36, but why it fail on the compilation ???

@Howard should have the reply !
Thanks for your help.