Skip to content

Commit adadce2

Browse files
committed
Updated documentation and small improvements
1 parent 752f0e4 commit adadce2

File tree

10 files changed

+21
-8
lines changed

10 files changed

+21
-8
lines changed

Libraries/Ethernet/utility/W5500.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ void W5500_Init(void)
4949
GPIO_ResetBits(GPIOA, GPIO_Pin_15);
5050
Delay_ms(40);
5151
GPIO_SetBits(GPIOA, GPIO_Pin_15);
52-
Delay_ms(25);
52+
Delay_ms(40);
5353

5454
W5500_SoftReset();
55-
Delay_ms(20);
55+
Delay_ms(40);
5656

5757
for(uint8_t i = 0; i < MAX_SOCK_NUM; i++)
5858
{
5959
uint8_t cntl_byte = (0x0C + (i<<5));
6060

61-
Write(0x1E, cntl_byte, 4); //0x1E - Sn_RXBUF_SIZE
62-
Write(0x1F, cntl_byte, 2); //0x1F - Sn_TXBUF_SIZE
61+
Write(0x1E, cntl_byte, 4); //0x1E - Sn_RXBUF_SIZE - 4k
62+
Write(0x1F, cntl_byte, 2); //0x1F - Sn_TXBUF_SIZE - 2k
6363
}
6464
}
6565

Libraries/Ethernet/utility/W5500.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "util2.h"
2323

2424

25-
#define MAX_SOCK_NUM 8
25+
#define MAX_SOCK_NUM 4 // Max 8
2626

2727

2828
#define W5500_SSIZE 2048 // Max Tx buffer size

Libraries/GrIP/ComIf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "ServerTCP.h"
2020
#include "Platform.h"
2121
#include "Print.h"
22-
#include "Usart.h"
22+
#include "USART.h"
2323
#include <string.h>
2424

2525

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ OBJDUMP = ${GCC_BASE}/arm-none-eabi-objdump
2626
#---------------------------------------------------------------------------------
2727
TARGET := GRBL_Advanced
2828
BUILD := build
29-
SOURCES := ./ cmsis/ grbl/ HAL/ HAL/EXTI HAL/FLASH HAL/GPIO HAL/I2C HAL/SPI HAL/STM32 HAL/TIM HAL/USART SPL/src Src/
29+
SOURCES := ./ cmsis/ grbl/ HAL/ HAL/EXTI HAL/FLASH HAL/GPIO HAL/I2C HAL/SPI HAL/STM32 HAL/TIM HAL/USART SPL/src Src/ Libraries/GrIP Libraries/CRC Libraries/Ethernet Libraries/Ethernet/utility
3030

3131
INCLUDES := $(SOURCES) SPL/inc
3232

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ Uses Dynamic TLO when $14=2
3737
Added support for external EEPROM (e.g. ST M24C08). Uncomment 'USE_EXT_EEPROM' in Config.h.
3838
![EEPROM](https://github.com/Schildkroet/GRBL-Advanced/blob/software/eeprom.png?raw=true)
3939

40+
#### ETHERNET Support
41+
GRBL-Advanced can be controlled with USB or ETHERNET. For ETHERNET an additional W5500 Module is required. Then uncomment ETH_IF in Platform.h. The default IP Address is 192.168.1.20.
42+
Use [Candle 2](https://github.com/Schildkroet/Candle2) as control interface.
43+
![W5500](https://github.com/Schildkroet/GRBL-Advanced/blob/software/w5500.png?raw=true)
44+
4045
#### Attention
4146
By default, settings are stored in internal flash memory in last sector. First startup takes about 5-10sec to write all settings.
4247

@@ -79,6 +84,7 @@ List of Supported G-Codes in Grbl-Advanced:
7984
- Feed Rate Modes: G93, G94
8085
- Unit Modes: G20, G21
8186
- Distance Modes: G90, G91
87+
- Retract Modes: G98, G99
8288
- Arc IJK Distance Modes: G91.1
8389
- Plane Select Modes: G17, G18, G19
8490
- Tool Length Offset Modes: G43.1, G49

grbl/ToolChange.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
static uint8_t isFirstTC = 1;
3333
static int32_t toolOffset = 0;
3434
static int32_t toolReferenz = 0;
35+
static float tc_pos[N_AXIS] = {0};
3536

3637

3738
void TC_Init(void)
@@ -40,6 +41,8 @@ void TC_Init(void)
4041
toolOffset = 0;
4142
toolReferenz = 0;
4243

44+
memset(tc_pos, 0, sizeof(float)*N_AXIS);
45+
4346
gc_state.modal.tool_length = TOOL_LENGTH_OFFSET_CANCEL;
4447
gc_state.tool_length_offset = 0.0;
4548
}
@@ -62,6 +65,7 @@ void TC_ChangeCurrentTool(void)
6265
// Don't move XY. Go to Z 0
6366
System_ConvertArraySteps2Mpos(position, sys_position);
6467
position[Z_AXIS] = 0.0;
68+
memcpy(tc_pos, position, sizeof(float)*N_AXIS);
6569

6670
//System_SetExecStateFlag(EXEC_TOOL_CHANGE);
6771

@@ -72,7 +76,7 @@ void TC_ChangeCurrentTool(void)
7276
pl_data.line_number = gc_state.line_number;
7377

7478
MC_Line(position, &pl_data);
75-
Delay_ms(5);
79+
Delay_ms(20);
7680

7781
Spindle_Stop();
7882

@@ -176,6 +180,9 @@ void TC_ProbeTLS(void)
176180

177181
MC_Line(position, &pl_data);
178182

183+
// Move back to initial tc position
184+
MC_Line(tc_pos, &pl_data);
185+
179186
// Wait until queue is processed
180187
Protocol_BufferSynchronize();
181188

nucleof411re_pinout.png

-505 KB
Binary file not shown.

pinout_left.png

486 KB
Loading

pinout_right.png

422 KB
Loading

w5500.png

180 KB
Loading

0 commit comments

Comments
 (0)