Trusted Firmware added a board test that commands a 1 kilohertz tone, captures 32 edges on the same physical pin, and accepts the measured frequency only within 5 percent. It then stops the tone and checks that the line stays quiet. The ESP32-P4 board runs the test over a Transmission Control Protocol (TCP) connection because its firmware command channel isn't on the serial console.
The test found hardware-specific problems while it was being built. The capture peripheral initially turned the output pin into an input, which erased the waveform it was supposed to measure. The fix enables internal loopback only when the tone generator is driving that pin. The suite also checks that a board can't start a tone on a pin reserved for an Ethernet shield and clears pulse-width modulation (PWM) output after each run.
A successful firmware response proves that a command parser ran. Counting edges proves that the timer, pin routing, output peripheral, and test connection worked together. Teams with waveform-generating firmware should copy this pattern on one representative board before trusting simulator-only frequency tests across the rest of a product line.