1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 02:42:36 +02:00

Some cleanup trying to get I2S steps working

This commit is contained in:
bdring
2021-06-07 16:26:13 -05:00
parent 66a4d6eba1
commit 0e23acc07a
5 changed files with 29 additions and 16 deletions

View File

@@ -3,12 +3,17 @@ board: "ESP32 Dev Controller V4"
yaml_wiki: "https://github.com/bdring/Grbl_Esp32/wiki/YAML-Config-File" yaml_wiki: "https://github.com/bdring/Grbl_Esp32/wiki/YAML-Config-File"
idle_time: 250 idle_time: 250
step_type: rmt step_type: I2S_static
dir_delay_microseconds: 1 dir_delay_microseconds: 1
pulse_microseconds: 2 pulse_microseconds: 2
disable_delay_us: 0 disable_delay_us: 0
homing_init_lock: false homing_init_lock: false
i2so:
bck: gpio.22
ws: gpio.17
data: gpio.21
axes: axes:
number_axis: 3 number_axis: 3
shared_stepper_disable: gpio.13:low shared_stepper_disable: gpio.13:low
@@ -22,10 +27,12 @@ axes:
gang0: gang0:
endstops: endstops:
dual: gpio.17:low:pu dual: gpio.33:low:pu
stepstick: stepstick:
direction: gpio:14 disable: i2so.0
step: gpio.12 direction: i2so.1
step: i2so.2
ms3: i2so.3
gang1: gang1:
null_motor: null_motor:
@@ -38,10 +45,12 @@ axes:
gang0: gang0:
endstops: endstops:
dual: gpio.4:high:pd dual: gpio.32:low:pu
stepstick: stepstick:
direction: gpio:15 disable: i2so.7
step: gpio.26 direction: i2so.4
step: i2so.5
ms3: i2so.6
gang1: gang1:
null_motor: null_motor:
@@ -54,17 +63,19 @@ axes:
gang0: gang0:
endstops: endstops:
dual: gpio.16:pu:low dual: gpio.34:low:pu
stepstick: stepstick:
direction: gpio:33 disable: i2so.8
step: gpio.27 direction: i2so.9
step: i2so.10
ms3: i2so.11
gang1: gang1:
null_motor: null_motor:
coolant: coolant:
flood: gpio.25:low flood: i2so.25
mist: gpio.21 mist: i2so.24
comms: comms:
wifi_sta: wifi_sta:
@@ -75,4 +86,4 @@ comms:
ssid: ScratchThat ssid: ScratchThat
probe: probe:
pin: gpio.32:high:pu pin: gpio.32:low:pu

View File

@@ -36,3 +36,5 @@
*/ */
#define MACHINE_NAME "Test Drive - Demo Only No I/O!" #define MACHINE_NAME "Test Drive - Demo Only No I/O!"
#define USE_I2S_STEPS

View File

@@ -430,7 +430,7 @@ GCUpdatePos mc_probe_cycle(float* target, plan_line_data_t* pl_data, uint8_t par
} }
#ifdef USE_I2S_STEPS #ifdef USE_I2S_STEPS
stepper_id_t save_stepper = config->_stepType; /* remember the stepper */ int save_stepper = config->_stepType; /* remember the stepper */
#endif #endif
// Switch stepper mode to the I2S static (realtime mode) // Switch stepper mode to the I2S static (realtime mode)
BACKUP_STEPPER(save_stepper); BACKUP_STEPPER(save_stepper);

View File

@@ -247,7 +247,7 @@ Error home(int cycle) {
sys.state = State::Homing; // Set system state variable sys.state = State::Homing; // Set system state variable
#ifdef USE_I2S_STEPS #ifdef USE_I2S_STEPS
stepper_id_t save_stepper = config->_stepType; int save_stepper = config->_stepType;
if (save_stepper == ST_I2S_STREAM) { if (save_stepper == ST_I2S_STREAM) {
stepper_switch(ST_I2S_STATIC); stepper_switch(ST_I2S_STATIC);
} }

View File

@@ -31,8 +31,8 @@
enum stepper_id_t { enum stepper_id_t {
ST_TIMED = 0, ST_TIMED = 0,
ST_RMT, ST_RMT,
ST_I2S_STREAM,
ST_I2S_STATIC, ST_I2S_STATIC,
ST_I2S_STREAM,
}; };
// esp32 work around for diable in main loop // esp32 work around for diable in main loop