We propose and experimentally demonstrate a photonic-assist measurement of microwave frequency by utilizing two cascaded photonic crystal (PC) cavities. By injecting different powers into the PC cavities, the device transmission spectra could be effectively manipulated. Consequently, the central frequencies of the microwave photonic filters (MPFs) can be flexibly adjusted. By utilizing the different MPF responses, adjustable amplitude comparison functions (ACFs) could be constructed. As the mapping relationships between the ACF ratios and the microwave frequencies are unique, the frequency with dynamic ranges could be measured according to the adjustable ACFs. The experimental results show that the measurement range of the microwave frequency is from 9 GHz to 19 GHz and the largest measurement errors are lower than 0.15 GHz. More importantly, the required optical power to manipulate the nanocavities is highly energy-efficient for on-chip nonlinear effect-based microwave measurements. The energy-efficient silicon device with compact size and low power is significant for dynamic frequency measurements in onchip microwave systems.