Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» MSC SD Updates
Browse files Browse the repository at this point in the history
Fixes ##26329
  • Loading branch information
thinkyhead committed Oct 8, 2023
1 parent 5fcaa70 commit 345ded3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/HAL/STM32/msc_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ class Sd2CardUSBMscHandler : public USBMscHandler {
bool done = false;
for (uint16_t rcount = SD_MULTIBLOCK_RETRY_CNT; !done && rcount--;) {
uint8_t *cBuf = pBuf;
sd2card->writeStart(blkAddr);
sd2card->writeStart(blkAddr, blkLen);
bool okay = true; // Assume success
for (uint32 i = blkLen; i--;) {
for (uint32_t i = blkLen; i--;) {
hal.watchdog_refresh();
if (!sd2card->writeData(cBuf)) { // Write. Did it fail?
sd2card->writeStop(); // writeStop for new writeStart
Expand Down Expand Up @@ -103,7 +103,7 @@ class Sd2CardUSBMscHandler : public USBMscHandler {
uint8_t *cBuf = pBuf;
sd2card->readStart(blkAddr);
bool okay = true; // Assume success
for (uint32 i = blkLen; i--;) {
for (uint32_t i = blkLen; i--;) {
hal.watchdog_refresh();
if (!sd2card->readData(cBuf)) { // Read. Did it fail?
sd2card->readStop(); // readStop for new readStart
Expand Down
3 changes: 2 additions & 1 deletion buildroot/tests/STM32F103RE_btt_USB
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ set -e
#
restore_configs
opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP SERIAL_PORT 1 SERIAL_PORT_2 -1
opt_enable SDSUPPORT EMERGENCY_PARSER
exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Configuration" "$3"

restore_configs
opt_set MOTHERBOARD BOARD_BTT_SKR_CR6 SERIAL_PORT -1 SERIAL_PORT_2 2 TEMP_SENSOR_BED 1
opt_enable CR10_STOCKDISPLAY FAN_SOFT_PWM \
opt_enable CR10_STOCKDISPLAY SDSUPPORT EMERGENCY_PARSER FAN_SOFT_PWM \
NOZZLE_AS_PROBE Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN Z_SAFE_HOMING \
PROBE_ACTIVATION_SWITCH PROBE_TARE PROBE_TARE_ONLY_WHILE_INACTIVE \
PROBING_HEATERS_OFF PREHEAT_BEFORE_PROBING
Expand Down

0 comments on commit 345ded3

Please sign in to comment.