Can I wire a transfer switch to two separate primary panels?
The way your 10 circuit transfer switch works is each switch is a single pole double throw (unless 240 then it is double pole double throw). The “common” switch element “load” leg connects to the generator in 1 position and to the service in the 2nd position. For small units wiring is usually remove wire from breaker connect to transfer switch # 1-10 common element or “load” switch leg. If each switch requires power from the service you run a wire from the breaker to the service side of the switch just connected. Run the Generator neutral / ground to the first panel and the second panel will be ok if fed from the first. If the 2nd panel is a separate feed or service not from the first panel you would be creating a ground loop (not allowed). You would need 1 wire from each breaker to the transfer switch and 1 wire from the “load” or common element/ switch leg of the transfer switch to the wire removed from the breaker. If your transfer switch is Buss fed as many larger ones are there would be 1 main breaker powering the transfer switch. Then powering the 2nd panel if fed from the first L1 &amp; L2 must stay the same in both panels (if you put a breaker from L1 on panel 1 and breaker on L2 in panel 2 with a common buss feeder when going back to the service position it will short the main possibly destroying the 2 switches wiring and tripping the main).  If each transfer switch is powered by the branch service breaker this is not a problem.