allora, finalmente ho risolto!
Non avevo ancora fatto la modifica che mi avevi suggerito, poi proprio stamattina dopo un po' di tempo mi ha risposto il tizio che ha realizzato la cape e mi ha consigliato di mettere una resistenza da 1kOhm tra i pin P9-2 e P9-14, (sono rispettivamente la GND e il pin 5 OUT1).
Non avendo quella da 1 kohm ho usato una resistenza da 820 e ho fatto un test e sembra funzionare: ho usato la prima schedina che mi hai consigliato e quando da Machinekit faccio shutdown la BBB si spegne e il mandrino rimane fermo.
Ho misurato anche con il tester le tensioni e la misurazione conferma che quando la BBB si spegne, il pin interessato ha tensione 0.
Penso che a questo punto non valga la pena di fare quella modifica alla cape, o no?
Riporto la risposta testualmente, sono cose che avevamo già capito, ma magari la risposta dell'autore può servire a chi ha la stessa cape per qualche info in più.
The output drivers of the Cape are powered from the 5V supply of the Beaglebone. Therefore the power of the output drivers will not be shut down with the power of the Beaglebone.
So the output drivers are powered as long as the power of the Beaglebone is at 5V.
When you switch on the Beaglebone the spindle the PWM output at P9-14 is configured as output an set to level 0.
This results in 0V at the output of the drivers. When you switch off the Beaglebone the output of the PWM will be switched off completely resulting in an open (not connected) input of the output driver. An open input of a TTL chip is always interpreted as logic 1 and not as you may expect as logic 0. Therefore the driver of the Cape will rise to 1.
There are two posibilities to prevent this behaviour.
1. Switch off the 5V power to prevent the spindle starting.
2. You may insert a pull down resistor at the input of the driver to force the input to 0 when the Beaglebone is off.
A resistor of 1 kOhm connected between P9-2 and P9-14 at the Cape should do.
Adesso sto sistemando tutti i componenti in un vecchio case, poi dovrò realizzare la seconda scheda per la gestione della velocità e fare un ultimo test finale....