General cleanup ahead of L64XX
This commit is contained in:
@ -6,20 +6,20 @@ These devices use voltage PWMs to drive the stepper phases. Phase current is not
|
||||
|
||||
This software assumes that all L6470 drivers are in one SPI daisy chain.
|
||||
|
||||
``` {.gcode}
|
||||
```
|
||||
The hardware setup is:
|
||||
|
||||
MOSI from controller tied to SDI on the first device
|
||||
MOSI from controller tied to SDI on the first device
|
||||
|
||||
SDO of the first device is tied to SDI of the next device
|
||||
SDO of the first device is tied to SDI of the next device
|
||||
|
||||
SDO of the last device is tied to MISO of the controller
|
||||
SDO of the last device is tied to MISO of the controller
|
||||
|
||||
all devices share the same SCK, SS\_PIN and RESET\_PIN
|
||||
all devices share the same SCK, SS\_PIN and RESET\_PIN
|
||||
|
||||
Each L6470 passes the data it saw on its SDI to its neighbor on the **NEXT** SPI cycle (8 bit delay).
|
||||
Each L6470 passes the data it saw on its SDI to its neighbor on the **NEXT** SPI cycle (8 bit delay).
|
||||
|
||||
Each L6470 acts on the **last** SPI data it saw when the SS\_PIN **goes high**.
|
||||
Each L6470 acts on the **last** SPI data it saw when the SS\_PIN **goes high**.
|
||||
```
|
||||
|
||||
The L6470 drivers operate in STEP\_CLOCK mode. In this mode the direction and enable are done via SPI commands and the phase currents are changed in response to step pulses (generated in the usual way).
|
||||
@ -58,12 +58,12 @@ The steppers are **NOT** powered up during this sequence.
|
||||
|
||||
This array is used by all routines that transmit SPI data.
|
||||
|
||||
``` {.gcode}
|
||||
```
|
||||
Location 0 - number of drivers in chain
|
||||
|
||||
Location 1 - axis index for first device in the chain (closest to MOSI)
|
||||
|
||||
…
|
||||
...
|
||||
|
||||
Location N - axis index for last device in the N device long chain (closest to MISO)
|
||||
```
|
||||
|
@ -19,6 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
@ -61,7 +62,7 @@ public:
|
||||
static char index_to_axis[MAX_L6470][3];
|
||||
static uint8_t dir_commands[MAX_L6470];
|
||||
|
||||
// flags to guarantee graceful switch if stepper interrupts L6470 SPI transfer
|
||||
// Flags to guarantee graceful switch if stepper interrupts L6470 SPI transfer
|
||||
static volatile bool spi_abort;
|
||||
static bool spi_active;
|
||||
|
||||
|
Reference in New Issue
Block a user