if the logitech unifying software is still not detecting your k540 wireless keyboard after following the on-screen instructions in the software, but your m320 wireless mouse is being detected, then the keyboard may have a different issue. i don't think replacing the receiver would make a differ...
This my first mini keyboard mouse set. So it needed some time to get used to. It works perfectly as it should. Connectivity is also perfect This set is bluetooth 5.2 “not IR” so bluetooth got its own disadvantages like it disconnects to save battery specially from keyboard But...