Skip to content

Commit

Permalink
Improved driver PWM spindle code. Updated for Web Builder requirements.
Browse files Browse the repository at this point in the history
Fix for issue #99.
  • Loading branch information
terjeio committed Oct 21, 2022
1 parent 0ad248d commit 1338c6b
Show file tree
Hide file tree
Showing 13 changed files with 594 additions and 191 deletions.
54 changes: 31 additions & 23 deletions .settings/language.settings.xml

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion .settings/org.eclipse.cdt.codan.core.prefs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions GRBL Driver STM32F4xx Debug F446 Nucleo64.launch
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&lt;gdbmemoryBlockExpression address=&quot;536874548&quot; label=&quot;0x20000e34&quot;/&gt;&lt;gdbmemoryBlockExpression address=&quot;536879452&quot; label=&quot;0x2000215c&quot;/&gt;&lt;gdbmemoryBlockExpression address=&quot;537001480&quot; label=&quot;0x2001fe08&quot;/&gt;&lt;/memoryBlockExpressionList&gt;"/>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x20003470,0x20003490,0x20003650,0x2000367a,0x20003670,0x20003671,0x20003675,0x20003676,0x20003660"/>
<stringAttribute key="saved_expressions&lt;seperator&gt;Unknown" value="0x20003470,0x20003490,0x20003650,0x2000367a,0x20003670,0x20003671,0x20003675,0x20003676,0x20003660,0x20000e44,0x2001fe08"/>
</launchConfiguration>
5 changes: 3 additions & 2 deletions GRBL Driver STM32F4xx Release F411 Blackpill.launch
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="true"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="false"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
Expand All @@ -66,12 +66,13 @@
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Release F411 Blackpill/GRBL Driver STM32F401.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="GRBL Driver STM32F401"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1170194714.977692720.1674432115"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/GRBL Driver STM32F401"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
</launchConfiguration>
3 changes: 3 additions & 0 deletions Inc/btt_skr_2.0_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@

#if TRINAMIC_UART_ENABLE

#undef TRINAMIC_UART_ENABLE
#define TRINAMIC_UART_ENABLE 2

#define MOTOR_UARTX_PORT GPIOE
#define MOTOR_UARTX_PIN 0
#define MOTOR_UARTY_PORT GPIOD
Expand Down
3 changes: 3 additions & 0 deletions Inc/btt_skr_pro_v1_1_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@

#if TRINAMIC_UART_ENABLE

#undef TRINAMIC_UART_ENABLE
#define TRINAMIC_UART_ENABLE 2

#define MOTOR_UARTX_PORT GPIOC
#define MOTOR_UARTX_PIN 13
#define MOTOR_UARTY_PORT GPIOE
Expand Down
3 changes: 3 additions & 0 deletions Inc/fysetc_s6_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@

#if TRINAMIC_UART_ENABLE

#undef TRINAMIC_UART_ENABLE
#define TRINAMIC_UART_ENABLE 2

#define MOTOR_UARTX_PORT GPIOE
#define MOTOR_UARTX_PIN 8
#define MOTOR_UARTY_PORT GPIOC
Expand Down
6 changes: 3 additions & 3 deletions Inc/my_machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//#define BOARD_BLACKPILL // For use with F411 BlackPill, with optional auto square support for one axis
//#define BOARD_MINI_BLACKPILL // For use with F411 BlackPill, https://github.com/avizienis/Minimal-Black-Pill--STM32F4xx-BOB-for-grblHAL
//#define BOARD_BTT_SKR_PRO_1_1 // F407 based 3D Printer board
//#define BOARD_BTT_SKR_PRO_1_2 // F407 based 3D Printer board
#define BOARD_BTT_SKR_PRO_1_2 // F407 based 3D Printer board
//#define BOARD_BTT_SKR_20 // F407 based 3D Printer board
//#define BOARD_BTT_SKR_20_DAC // F407 based 3D Printer board, uses analog output (DAC) for spindle speed control
//#define BOARD_FYSETC_S6 // F446 based 3D Printer board
Expand Down Expand Up @@ -68,14 +68,14 @@
//#define LASER_COOLANT_ENABLE 1 // Laser coolant plugin. To be completed.
//#define TRINAMIC_ENABLE 2130 // Trinamic TMC2130 stepper driver support. NOTE: work in progress.
//#define TRINAMIC_ENABLE 5160 // Trinamic TMC5160 stepper driver support. NOTE: work in progress.
//#define TRINAMIC_ENABLE 2209 // Trinamic TMC2209 stepper driver support. NOTE: work in progress.
#define TRINAMIC_ENABLE 2209 // Trinamic TMC2209 stepper driver support. NOTE: work in progress.
//#define TRINAMIC_I2C 1 // Trinamic I2C - SPI bridge interface.
//#define TRINAMIC_DEV 1 // Development mode, adds a few M-codes to aid debugging. Do not enable in production code.
//#define EEPROM_ENABLE 1 // I2C EEPROM support. Set to 1 for 24LC16 (2K), 3 for 24C32 (4K - 32 byte page) and 2 for other sizes. Enables eeprom plugin.
//#define EEPROM_IS_FRAM 1 // Uncomment when EEPROM is enabled and chip is FRAM, this to remove write delay.
//#define SPINDLE_SYNC_ENABLE 1 // Enable spindle sync support (G33, G76). !! NOTE: Alpha quality - enable only for test or verification.
// Currently only available for BOARD_T41BB5X_PRO and BOARD_T41U5XBB_SS.
#define ESTOP_ENABLE 0 // When enabled only real-time report requests will be executed when the reset pin is asserted.
//#define ESTOP_ENABLE 0 // When enabled only real-time report requests will be executed when the reset pin is asserted.
// Note: if left commented out the default setting is determined from COMPATIBILITY_LEVEL.

// If the selected board map supports more than three motors ganging and/or auto-squaring
Expand Down
3 changes: 2 additions & 1 deletion Inc/protoneer_3.xx_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Part of grblHAL
Copyright (c) 2020-2021 Terje Io
Copyright (c) 2020-2022 Terje Io
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -65,6 +65,7 @@
#define Z_LIMIT_PORT GPIOA // D11
#define Z_LIMIT_PIN 7
#define LIMIT_INMODE GPIO_BITBAND
#define Z_LIMIT_POLL

// Define ganged axis or A axis step pulse and step direction output pins.
#if N_ABC_MOTORS == 1
Expand Down
Loading

0 comments on commit 1338c6b

Please sign in to comment.