@umutduman said in Duet 2 WiFi stuck in SAM-BA after SPI firmware update:
@dc42 that is PsoC which is supplying by 3.3v
I don't know what you mean by PsoC. However, when two microcontrollers communicate with each other and they are powered separately, it is important to ensure that when only one of them is powered, the outputs of that one cannot feed more current into the inputs of the second one than the maximum rated injection current of the second one. So my guess is that at some time, your other MCU was powered ands the Duet was not, causing the other MCU to feed injection current into the Duet input. In fact the SAM4E MCU on the Duet doesn't have an injection current rating, implying that injection current isn't allowed at all. Even if injection current doesn't burn out the input pin protection diode, it may trigger parasitic SCRs in some chips that then cause catastrophic damage.
Our Duet 3 main boards use an SPI connection to the optional attached Raspberry Pi or similar SBC and we have to avoid damage when just one of the Duet and the Pi is powered. We connect the SPI signals via buffers that are designed to handle inputs that are referred to a different power rail from the outputs. You can find the schematic and the part numbers of those buffers in Github, for example at https://github.com/Duet3D/Duet3-Mainboard-6HC/tree/master/Duet3_Mainboard_6HC_v1.02.