Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for BTT SKR PRO V1.2 #66

Open
jiangotto opened this issue Oct 28, 2024 · 8 comments
Open

Support for BTT SKR PRO V1.2 #66

jiangotto opened this issue Oct 28, 2024 · 8 comments

Comments

@jiangotto
Copy link

jiangotto commented Oct 28, 2024

Should I edit the source code and recompile the firmware for it or just use BTT_407?
BTT SKR PRO V1.2's MCU is STM32F407ZGT6
https://teamgloomy.github.io/skr_pro_1.2_pins_3_5.html
Uploading SKR-PRO-V1.2.PDF…

@jiangotto
Copy link
Author

SKR_PRO_V1_2.zip
I add SKR_PRO_V1_2 support and compile it. I will test it later.

@cakeslob
Copy link
Contributor

alright cool, just check its similar to this guys setup
spi on SPI2 and sd card on spi1 it looks like

@jiangotto
Copy link
Author

jiangotto commented Oct 31, 2024

Here is the UART output from my skr pro v1.2.

Creating a std module

Remora PRU - Programmble Realtime Un 

 Mbed-OS6

 Remora-spi Driver 



## Entering SETUP state

1. Reading json configuration file

Mounting the filesystem... OK


file lenght = 2061


Closing "/fs/config.txt"... 

2. Setting up DMA and threads

Initialising SPI2 slave

Initialising DMA for SPI2



3. Parsing json configuration file

Config deserialisation - Invalid input!

Creating thread 40000

Creating thread 1000

Creating thread 57600



## Entering START state



Starting the BASE thread

Registering interrupt for interrupt number = 24

        power on Timer 9



Starting the SERVO thread

Registering interrupt for interrupt number = 25

        power on Timer 10



## Entering IDLE state

And here is my config.txt.

{
	"Board": "BIGTREETECH SKR PRO V1.2",
	"Modules":[
	{
	"Thread": "Servo",
	"Type": "Reset Pin",
		"Comment":			"Reset pin",
		"Pin":				"PG_10"
	},
	{
	"Thread": "Base",
	"Type": "Stepgen",
		"Comment":			"X - Joint 0 step generator",
		"Joint Number":		0,
		"Step Pin": 		"PE_9",
		"Direction Pin": 	"PF_1",
		"Enable Pin": 		"PF_2"
	},
	{
	"Thread": "On load",
	"Type": "TMC2209",
		"Comment":			"X - Joint 0 TMC driver",
		"RX pin": 			"PA_15",
		"RSense":			0.11,
		"Current":			800,
		"Microsteps":		16,
		"Stealth chop":		"on",
		"Stall sensitivity":0
	},
	{
	"Thread": "Base",
	"Type": "Stepgen",
		"Comment":			"Y - Joint 1 step generator",
		"Joint Number":		1,
		"Step Pin": 		"PE_11",
		"Direction Pin": 	"PE_8,
		"Enable Pin": 		"PD_7"
	},
	{
	"Thread": "On load",
	"Type": "TMC2209",
		"Comment":			"Y - Joint 1 TMC driver",
		"RX pin": 			"PB_8",
		"RSense":			0.11,
		"Current":			800,
		"Microsteps":		16,
		"Stealth chop":		"on",
		"Stall sensitivity":0
	},
	{
	"Thread": "Base",
	"Type": "Stepgen",
		"Comment":			"Z - Joint 2 step generator",
		"Joint Number":		2,
		"Step Pin": 		"PE_13",
		"Direction Pin": 	"PC_2",
		"Enable Pin": 		"PC_0"
	},
	{
	"Thread": "On load",
	"Type": "TMC2209",
		"Comment":			"Z - Joint 2 TMC driver",
		"RX pin": 			"PB_9",
		"RSense":			0.11,
		"Current":			800,
		"Microsteps":		16,
		"Stealth chop":		"on",
		"Stall sensitivity":0
	},
	{
	"Thread": "Servo",
	"Type": "Digital Pin",
		"Comment":			"X max",
		"Pin":				"PB_10",
		"Mode":				"Input",
		"Data Bit":			0
	},
	{
	"Thread": "Servo",
	"Type": "Digital Pin",
		"Comment":			"Y min",
		"Pin":				"PE_12",
		"Mode":				"Input",
		"Data Bit":			1
	},
	{
	"Thread": "Servo",
	"Type": "Digital Pin",
		"Comment":			"Z min",
		"Pin":				"PG_8",
		"Mode":				"Input",
		"Data Bit":			2
	},
	{
	"Thread": "Servo",
	"Type": "Switch",
		"Comment":			"Extruder fan switch",
		"Pin":				"PE_5",
		"Mode":				"On",
		"PV[i]":			0,
		"SP":				25.5
	}
	]
}

oh, I forgot a ” in here "Direction Pin": "PE_8,

@jiangotto
Copy link
Author

Motors can work now, bThe motors are now working, but after I move one axis, the motor keeps running continuously and won’t stop unless I move it in the opposite direction. Then, it shows an error: joint x following error

@cakeslob
Copy link
Contributor

install this remora comp and let me know how it goes, this is the new one
https://github.com/scottalford75/Remora/tree/main/LinuxCNC/Components/Remora-spi

also, did it print out all the details of your config file in UART?

@jiangotto
Copy link
Author

jiangotto commented Nov 1, 2024

install this remora comp and let me know how it goes, this is the new one https://github.com/scottalford75/Remora/tree/main/LinuxCNC/Components/Remora-spi

also, did it print out all the details of your config file in UART?

Creating a std module



Remora PRU - Programmable Realtime Unit 



 Mbed-OS6 



 Remora-spi Driver 



## Entering SETUP state

1. Reading json configuration file

/config.txt"... OK

Json config file lenght = 2062


Closing "/fs/config.txt"... 

2. Setting up DMA and threads

Initialising SPI2 slave

Initialising DMA for SPI2



3. Parsing json configuration file

Config deserialisation - Deserialization succeeded



4. Config threads

Creating thread 40000

Creating thread 1000

Creating thread 57600



5. Loading modules



Servo thread object

Reset pin

Make Reset Pin at pin PG_10



Creating a std module

Creating Pin @

  port = GPIOG

  pin = 10



Base thread object

X - Joint 0 step generator



Creating a std module

Creating Pin @

  port = GPIOF

  pin = 2

Creating Pin @

  port = GPIOE

  pin = 9

Creating Pin @

  port = GPIOF

  pin = 1



On load - run once module

Make TMC2209

X - Joint 0 TMC driver



Creating a std module

Creating Pin @

  port = GPIOA

  pin = 15



Starting the COMMS thread

Registering interrupt for interrupt number = 26

        power on Timer 11


Testing connection to TMC driver...failed!

Likely cause: no power

  Fix the problem and reset board.



Stopping the COMMS thread

        timer stop



Base thread object

Y - Joint 1 step generator



Creating a std module

Creating Pin @

  port = GPIOD

  pin = 7

Creating Pin @

  port = GPIOE

  pin = 11

Creating Pin @

  port = GPIOE

  pin = 8



On load - run once module

Make TMC2209

Y - Joint 1 TMC driver



Creating a std module

Creating Pin @

  port = GPIOB

  pin = 8



Starting the COMMS thread

Registering interrupt for interrupt number = 26

        power on Timer 11


Testing connection to TMC driver...failed!

Likely cause: no power

  Fix the problem and reset board.



Stopping the COMMS thread

        timer stop



Base thread object

Z - Joint 2 step generator



Creating a std module

Creating Pin @

  port = GPIOC

  pin = 0

Creating Pin @

  port = GPIOE

  pin = 13

Creating Pin @

  port = GPIOC

  pin = 2



On load - run once module

Make TMC2209

Z - Joint 2 TMC driver



Creating a std module

Creating Pin @

  port = GPIOB

  pin = 9



Starting the COMMS thread

Registering interrupt for interrupt number = 26

        power on Timer 11


Testing connection to TMC driver...failed!

Likely cause: no power

  Fix the problem and reset board.



Stopping the COMMS thread

        timer stop



Servo thread object

X max

Make Digital Input at pin PB_10



Creating a std module

  Setting pin as No Pull

Creating Pin @

  port = GPIOB

  pin = 10



Servo thread object

Y min

Make Digital Input at pin PE_12



Creating a std module

  Setting pin as No Pull

Creating Pin @

  port = GPIOE

  pin = 12



Servo thread object

Z min

Make Digital Input at pin PG_8



Creating a std module

  Setting pin as No Pull

Creating Pin @

  port = GPIOG

  pin = 8



Servo thread object

Extruder fan switch

Make Switch (On) at pin PE_5



Creating a std module

Creating a Switch

Creating Pin @

  port = GPIOE

  pin = 5



## Entering START state



Starting the BASE thread

Registering interrupt for interrupt number = 24

        power on Timer 9



Starting the SERVO thread

Registering interrupt for interrupt number = 25

        power on Timer 10



## Entering IDLE state


## Entering RUNING state

Something wrong with TMC driver.
I'm wondering what the difference between Remora and Remora-spi is. I just installed Remora.

@jiangotto
Copy link
Author

jiangotto commented Nov 1, 2024

oh, Remora-spi does work! Now no more joint x following errors. My machine works perfectly. Thanks a lot.
Maybe you can add skr pro v1.2 support to Remora now.
btw, I also use a bunch of shorter Dupont lines, about 10cm.

@cakeslob
Copy link
Contributor

cakeslob commented Nov 1, 2024

yeah, it was just the other guy never did a pull, and we dont have one to test

yeah, i also use 100mm , sometimes 125-150 max

the difference between remora and remora-spi has to do with the way it counts steps, so for the new remora-spi component, the new firmware is needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants