My Solution:
note: This was a used machine that had a new, but unused, main board. My test indiced everything worked except the z axis (see the original post)
The short Version. Replaced z-limit switch wiring. Everything works.
No one answered my post so I spent a lot of time and some money trying to find my solution. After research I found that possible solutions were binding on the z- axis, software problems, bad driver, and, most frequently, a bad z-limit switch. Some things I could check, some I could not. I started with the switch
I replaced the switch and got the same results.
I started looking at the voltages on the switch. There should be 5V on the switch. (possibly 3.3V is your using a stm32 board). No voltage on the switch. Also no voltage on the connector to the switch pcb board or connector itself.
Going back to the main board, I pulled the z-axis plug and checked the output from the board. The board was producing 5V. Put two jumper wires on the output of the main board and a switch and test, Everything worked. So The Wiring Was the Problem.
Creality used ribbon cable and intermediate connectors for the wiring, Replacing the wiring to the switch means running an extra cable from the main board to the switch. Not a big problem, just make sure you get the proper length so every thing fits together.
The main problem was one of the connectors, The connector on the main board, one of the connections on the intermediate connector, or the one of the connections of the final wire the switch PCB. I decided to bypass run a single cable directly from the mainboard to the switch PCB. I twisted the two switch wires together to form a twisted pair.
Creality uses standard JST micro crimp connectors. These are available from various sources. Working with them with fingers and pliers is a real pain. I don’t recommend it.
A crimper will make things much easier. OR…Amazon (and possibly other vendors) have pre-assembled wires with and 2/3/… position JST connectors. It is much easier to splice additional lengths to the pre-assembled wires than to work directly with wires to the connectors without a crimper. They also sell JST kits with the crimper ( multple vendors)