A4988 causing MCU Resets

Hi folks, this is my second project using the Pololu A4988 driver. I’ve configured two drivers for a max current of 0.6amps. I’m using a 12v 5A power supply and two buck convertors to power 2 mcus (Attiny841 and Attiny87).

Essentially, i’m seeing the Attiny841 reboot at random intervals. The reboot goes away when i disconnect the steppers motors. If i power the steppers from a separate 12v supply everything runs dandy. if i power the 841 from a separate 5v supply, everything runs great. The diagramed DC motors have been disconnected through out the test. I’ve even disconnected the DRV8833 driver. My guess is that the steppers have some sort back EMF thats messing up MPM3610 buck convertor (maybe?). Not sure why the 87 isn’t seeing the same issue ( possibly since its intended for noisy environments- certainly not because of the 100uf cap i added - that was a later addition while i was trying to get it to stop seizing up on i2c between it and the 841)
These are the stepper motors I’m using:
Amazon.com
This is the power supply (set to supply 12.1v) :
Amazon.com

5v buck: MPM3610 5V Buck Converter Breakout - 21V In 5V Out at 1.2A : ID 4739 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits
6v variable buck: Amazon.com

Here is the wiring diagram:

Here is the code I use to step the motors, it runs 1-4 times every 2-8 minutes:

#define PIN_FWD_ENABLE PIN_PA4
#define PIN_FWD_STEP PIN_PA3
#define PIN_FWD_DIR PIN_PA2

#define PIN_RRR_ENABLE PIN_PA7
#define PIN_RRR_STEP PIN_PA6
#define PIN_RRR_DIR PIN_PA5
typedef enum {
  SECTION_AFT,
  SECTION_FORE
} section_t;
void LiftSection(section_t section) {
  byte pinEnable = PIN_FWD_ENABLE;
  byte pinDir = PIN_FWD_DIR;
  byte pinStep = PIN_FWD_STEP;

  if (section == SECTION_AFT) {
    pinEnable = PIN_RRR_ENABLE;
    pinDir = PIN_RRR_DIR;
    pinStep = PIN_RRR_STEP;
  }

  digitalWrite(pinEnable, 0);
  digitalWrite(pinDir, STEP_DIR_UP);
  for (byte i = 0; i < 50; i++) {
    digitalWrite(pinStep, HIGH);
    delayMicroseconds(1000);
    digitalWrite(pinStep, LOW);
    delayMicroseconds(1000);
  }
  digitalWrite(pinEnable, 1);
}

Any help or comments on code and design would be appreciated. Thanks!

Hello.

Could you try looking at your power supply voltage with an oscilloscope while your system is running to see what it is doing when it resets? Also, could you post some pictures of your setup that show all of your connections?

Brandon