I have attached a little photo of my board, showing only one of the 4 channels.
I'm using these isolated 5v:5v regulators, and I made the footprint wrong in orcad. Ignore that mistake! Corrected for REV;B board
Anyway, I added the 8 "Ultra Fast Avalanche Sinterglass Diodes" to the output/motor leads.
I also have the SR line pulled LOW(Active Mode-Sync Rec Occurs).
I also kept the grounds isolated.
As in,
To the A3977 I have 5V & 24Volts going to the chip.
Pins 44,1,2 22,23,24 33,34,35 are connected to the 24V supply ground.
Pins 11,12,13 are connected to the 5V supply.
With the chip off the board, these two ground paths are isolated.
The chip connects them internally.
That was a tip from Allegro. It really helped minimize noise seen on the 5v and 24V supply lines while the motor was running.