Working on designing an ESC for BLDC motor and I need 6PWM. I am using ATMEGA328p-AU. I need to program the M328p after its in the PCB so I need to leave some pin outs for SPI. But some PWM and SPI pins are same. I applied a switch/buffer between MISO and MOSI. But to enable the SPI mode, I would always need the SS pin as input while also need it in PWM. What can I do?
If possible can I change SS pin?