JustPaste.it
# This file contains common pin mappings for the BigTreeTech E3 RRF 1.1.
# To use this config, the firmware should be compiled for the
# STM32F407 with a "32KiB bootloader".
# So i figure out what was wrong. STM32F407 with 32kib loader.. but you have to unplug the screen.. then all will we fine. Now it runs !
 
# The "make flash" command does not work on the E3 RRF 1.1. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the E3 RRF
# 1.1 with that SD card.
 
# See docs/Config_Reference.md for a description of parameters.
[include mainsail.cfg]
 
[stepper_x]
step_pin: PD5
dir_pin: !PD4
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC0
position_endstop: 0
position_max: 235
homing_speed: 50
 
[tmc2209 stepper_x]
uart_pin: PD6
run_current: 0.580
stealthchop_threshold: 999999
 
[stepper_y]
step_pin: PD0
dir_pin: !PA15
enable_pin: !PD3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: 0
position_max: 235
homing_speed: 50
 
[tmc2209 stepper_y]
uart_pin: PD1
run_current: 0.580
stealthchop_threshold: 999999
 
[stepper_z]
step_pin: PC6
dir_pin: PC7
enable_pin: !PD14
microsteps: 16
rotation_distance: 2
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0.0
position_max: 200
position_min: -1
homing_speed: 2
 
[tmc2209 stepper_z]
uart_pin: PD15
run_current: 0.580
stealthchop_threshold: 999999
 
[extruder]
step_pin: PD12
dir_pin: !PD13
enable_pin: !PD10
microsteps: 16
rotation_distance: 8.1
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB3
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
 
[tmc2209 extruder]
uart_pin: PD11
run_current: 0.650
stealthchop_threshold: 999999
 
[heater_bed]
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA1
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 110
 
[heater_fan heatbreak_cooling_fan]
pin: PB6
 
[fan]
pin: PB5
 
[mcu]
# with marlin
#usb-STMicroelectronics_BIGTREE_E3_RRF_CDC_in_FS_Mode_207C326C3553-if00
# other forum example
#serial:/dev/serial/by-id/usb-Klipper_stm32f407xx_207C326C3547303034313331-if00
#usb-Klipper_stm32f407xx_1F004800025053354D323420-if00
# official klipper example
serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_1F004800025053354D323420-if00
 
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 2500
max_accel_to_decel: 2000
max_z_velocity: 5
max_z_accel: 50
 
[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2
 
[board_pins]
aliases:
    # EXP1 header
    EXP1_1=PE8, EXP1_3=PE7,   EXP1_5=PB2, EXP1_7=PB1, EXP1_9=<GND>,
    EXP1_2=PE9, EXP1_4=<RST>, EXP1_6=PE10,  EXP1_8=PE11, EXP1_10=<5V>
 
[bltouch]
sensor_pin: ^PC5
#   Pin connected to the BLTouch sensor pin. Most BLTouch devices
#   require a pullup on the sensor pin (prefix the pin name with "^").
#   This parameter must be provided.
control_pin: PB0
#   Pin connected to the BLTouch control pin. This parameter must be
#   provided.
#pin_move_time: 0.680
#   The amount of time (in seconds) to wait for the BLTouch pin to
#   move up or down. The default is 0.680 seconds.
stow_on_each_sample: False
#   This determines if Klipper should command the pin to move up
#   between each probe attempt when performing a multiple probe
#   sequence. Read the directions in docs/BLTouch.md before setting
#   this to False. The default is True.
probe_with_touch_mode: True
#   If this is set to True then Klipper will probe with the device in
#   "touch_mode". The default is False (probing in "pin_down" mode).
#pin_up_reports_not_triggered: True
#   Set if the BLTouch consistently reports the probe in a "not
#   triggered" state after a successful "pin_up" command. This should
#   be True for all genuine BLTouch devices. Read the directions in
#   docs/BLTouch.md before setting this to False. The default is True.
#pin_up_touch_mode_reports_triggered: True
#   Set if the BLTouch consistently reports a "triggered" state after
#   the commands "pin_up" followed by "touch_mode". This should be
#   True for all genuine BLTouch devices. Read the directions in
#   docs/BLTouch.md before setting this to False. The default is True.
#set_output_mode:
#   Request a specific sensor pin output mode on the BLTouch V3.0 (and
#   later). This setting should not be used on other types of probes.
#   Set to "5V" to request a sensor pin output of 5 Volts (only use if
#   the controller board needs 5V mode and is 5V tolerant on its input
#   signal line). Set to "OD" to request the sensor pin output use
#   open drain mode. The default is to not request an output mode.
x_offset: -43
y_offset: 0
speed: 2
samples: 2
#z_offset: 2.33
#sample_retract_dist:
#samples_result:
#samples_tolerance:
#samples_tolerance_retries:
#   See the "probe" section for information on these parameters.
 
[safe_z_home]
home_xy_position: 120,120 # Change coordinates to the center of your print bed
speed: 150
z_hop: 3             # Move up 10mm
z_hop_speed: 3
 
[firmware_retraction]
retract_length: 1.2
retract_speed: 60
unretract_extra_length: 0
unretract_speed: 60
 
[bed_mesh]
speed: 150
#   The speed (in mm/s) of non-probing moves during the calibration.
#   The default is 50.
horizontal_move_z: 4
#   The height (in mm) that the head should be commanded to move to
#   just prior to starting a probe operation. The default is 5.
#mesh_radius:
#   Defines the radius of the mesh to probe for round beds. Note that
#   the radius is relative to the coordinate specified by the
#   mesh_origin option. This parameter must be provided for round beds
#   and omitted for rectangular beds.
#mesh_origin:
#   Defines the center x,y coordinate of the mesh for round beds. This
#   coordinate is relative to the probe's location. It may be useful
#   to adjust the mesh_origin in an effort to maximize the size of the
#   mesh radius. Default is 0,0. This parameter must be omitted for
#   rectangular beds.
mesh_min: 20,20 # probe x,y value, not the nozzle
#   Defines the minimum x,y coordinate of the mesh for rectangular
#   beds. This coordinate is relative to the probe's location. This
#   will be the first point probed, nearest to the origin. This
#   parameter must be provided for rectangular beds.
mesh_max: 190,215 # maximum x value is x axis max minus bltouch offset
#   Defines the maximum x,y coordinate of the mesh for rectangular
#   beds. Adheres to the same principle as mesh_min, however this will
#   be the furthest point probed from the bed's origin. This parameter
#   must be provided for rectangular beds.
probe_count: 3,3
#   For rectangular beds, this is a comma separate pair of integer
#   values (X,Y) defining the number of points to probe along each
#   axis. A single value is also valid, in which case that value will
#   be applied to both axes. Default is 3,3.
#round_probe_count: 5
#   For round beds, this integer value defines the maximum number of
#   points to probe along each axis. This value must be an odd number.
#   Default is 5.
#fade_start: 1.0
#   The gcode z position in which to start phasing out z-adjustment
#   when fade is enabled. Default is 1.0.
#fade_end: 0.0
#   The gcode z position in which phasing out completes. When set to a
#   value below fade_start, fade is disabled. It should be noted that
#   fade may add unwanted scaling along the z-axis of a print. If a
#   user wishes to enable fade, a value of 10.0 is recommended.
#   Default is 0.0, which disables fade.
#fade_target:
#   The z position in which fade should converge. When this value is
#   set to a non-zero value it must be within the range of z-values in
#   the mesh. Users that wish to converge to the z homing position
#   should set this to 0. Default is the average z value of the mesh.
#split_delta_z: .025
#   The amount of Z difference (in mm) along a move that will trigger
#   a split. Default is .025.
#move_check_distance: 5.0
#   The distance (in mm) along a move to check for split_delta_z.
#   This is also the minimum length that a move can be split. Default
#   is 5.0.
mesh_pps: 2,2
#   A comma separated pair of integers (X,Y) defining the number of
#   points per segment to interpolate in the mesh along each axis. A
#   "segment" can be defined as the space between each probed point.
#   The user may enter a single value which will be applied to both
#   axes. Default is 2,2.
algorithm: bicubic
#   The interpolation algorithm to use. May be either "lagrange" or
#   "bicubic". This option will not affect 3x3 grids, which are forced
#   to use lagrange sampling. Default is lagrange.
bicubic_tension: .1
#   When using the bicubic algorithm the tension parameter above may
#   be applied to change the amount of slope interpolated. Larger
#   numbers will increase the amount of slope, which results in more
#   curvature in the mesh. Default is .2.
#relative_reference_index:
#   A point index in the mesh to reference all z values to. Enabling
#   this parameter produces a mesh relative to the probed z position
#   at the provided index.
 
 
[gcode_macro G29]
gcode:
 G28
 BED_MESH_CALIBRATE
 BED_MESH_PROFILE SAVE=p1
 G1 X0 Y0 Z5 F4000
 
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*#   -0.014687, -0.002187, 0.005000
#*#   0.003125, 0.015000, -0.005000
#*#   0.023125, 0.011875, 0.007188
#*# x_count = 3
#*# y_count = 3
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.1
#*# min_x = 20.0
#*# max_x = 190.0
#*# min_y = 20.0
#*# max_y = 215.0
#*#
#*# [bltouch]
#*# z_offset = 0.615