Skip to content

Babystepping and linear advance on I2S stepper stream #4

@vivian-ng

Description

@vivian-ng

As of today, babystepping and linear advance does not work on I2S stepper stream. In Marlin, the pins file for the MRR ESPE will #undef LINEAR_ADVANCE, and if you try to do babystepping on the LCD, it will trigger a reset.

According to this comment,

@vivian-ng I think the problem with both is that when using I2S, the "real" stepper ISR (see https://github.com/MarlinFirmware/Marlin/blob/1955eea1b8f13697259e0e2403d47279d2d1ac6a/Marlin/src/module/stepper.cpp#L1338) never gets called but only Stepper::pulse_phase_isr() and Stepper::block_phase_isr() (see https://github.com/MarlinFirmware/Marlin/blob/1955eea1b8f13697259e0e2403d47279d2d1ac6a/Marlin/src/HAL/HAL_ESP32/i2s.cpp#L156) whenever new steps are needed to fill the I2S buffer.
One would probably have to add the logic to call advance_isr() and babystepping_isr() there, too. Unfortunately it does not seem like an easy task on first sight since one probably needs a good understanding of the stepper timings to be able to succeed

I don't think anyone other than @simon-jouet, the author of the Marlin ESP32 HAL's I2S code, has that kind of good understanding of the I2S stepper timing to be able to resolve this. So it may take a while for this issue to be resolved. Of course, the good thing about open source software is that anyone is free to give a try at finding a solution to this. Feel free to use this thread for discussions on this, and hopefully, a report of success somewhere in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions