Wireless networked control systems (WNCSs) with control loops closed over a wireless network are prevailing these days. However, due to uncertainties such as random accessing delays and possible packet drops, the stability analysis for a WNCS is a challenging task. Most previous studies on the communication network analysis either relied on Monte Carlo simulation or followed the multistate Markov chain framework. In this paper, our main contribution is to propose a formal method-based stability analysis in which the communication system is modeled as a probabilistic timed automaton. The underlying communication protocol is analyzed through probabilistic model checking. In particular, the stability condition of the WNCS is expressed in the probabilistic temporal logic formula as the quality of service requirement, which can be checked, and the satisfaction of the specification is equivalent to the stability guarantee of the WNCS. We then study the impact of different media access control (MAC) parameters on the satisfaction of the specification. Furthermore, if the specification is not satisfied initially, we propose a systematic way to tune the MAC parameters or redesign the controller so that the specification can be met. This paper presents an attempt and a new angle to the communication and control system codesign problem.