Skip to content

Commit

Permalink
Added symbol for overriding SD card frequency, bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeio committed Oct 2, 2024
1 parent 2da8bbd commit 7b7bd8b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions main/boards/xPro_v5_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,5 @@
#define MOTOR_CS_PIN GPIO_NUM_17
#if SDCARD_ENABLE
#define PIN_NUM_CS GPIO_NUM_5
#define SDMMC_FREQ_KHZ 10000
#endif
7 changes: 5 additions & 2 deletions main/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ IRAM_ATTR static void I2SStepperPulseStart (stepper_t *stepper)
static void I2SStepperWakeUp (void)
{
// Enable stepper drivers.
hal.stepper.enable((axes_signals_t){AXES_BITMASK});
hal.stepper.enable((axes_signals_t){AXES_BITMASK}, false);
i2s_out_set_stepping();
}

Expand Down Expand Up @@ -2577,6 +2577,9 @@ static char *sdcard_mount (FATFS **fs)
};

sdmmc_host_t host = SDSPI_HOST_DEFAULT();
#ifdef SDMMC_FREQ_KHZ
host.max_freq_khz = SDMMC_FREQ_KHZ;
#endif
sdspi_device_config_t slot_config = SDSPI_DEVICE_CONFIG_DEFAULT();
slot_config.gpio_cs = PIN_NUM_CS;
slot_config.host_id = host.slot;
Expand Down Expand Up @@ -2981,7 +2984,7 @@ bool driver_init (void)
#else
hal.info = "ESP32";
#endif
hal.driver_version = "240921";
hal.driver_version = "241002";
hal.driver_url = GRBL_URL "/ESP32";
#ifdef BOARD_NAME
hal.board = BOARD_NAME;
Expand Down
2 changes: 1 addition & 1 deletion main/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ typedef struct {
#error "Pins 34 - 39 are input only!"
#endif

#if USE_I2S_OUT && STEP_INJECT_ENABLE
#if defined(USE_I2S_OUT) && STEP_INJECT_ENABLE
#error "Step injection not yet possible with I2S streaming!"
#endif

Expand Down

0 comments on commit 7b7bd8b

Please sign in to comment.