Can SPI SS pin be used as PWM output by slave on ATMEGA328p-AU?
Edit: This is what bootloaders are good for. For some period of time, when your device comes out of a power-on/Reset, the MCU is in Slave mode waiting to receive programming. After some set time, it switches to Master mode and runs the normal program.
You can change the SS pin to any other DIO pin and you can use Analog pins as DIOs for the circuits slave (motor control) operation so you don't enable your regular slave while programming.
To use analog pins as DIO, A0 = DIO14, A1 = DIO15, Etc... Set the DIO number pinMode to output.
For setting the SS pin number, you can #define ss= Whatever pin you like but make sure to set that pin as an output and write it high before setting the rest of the SPI settings. Arduino site has good notes on that if you have any trouble.