Wideband microwave signals with high timefrequency linearity for high-resolution radar applications can be optically generated using high-speed electronic waveform generators. Frequency-shifting modulation in an optical cavity provides an attractive approach to generate broadband microwave signals with reduced complexity requiring only MHz-level electronics. However, the in-loop signal instability and inter-pulse interference usually cause amplitude fluctuations, leading to limited signal-to-noise ratio and signal bandwidth. Here, we overcome these challenges and demonstrate, for the first time, the photonic generation of 30-GHz-wide stepped-frequency (SF) signals with 100 MHz frequency steps defined by an MHz-level electrical oscillator. We achieved this performance by mitigating the in-loop polarization scrambling and inter-pulse interference using a polarization-maintaining cavity and a high-extinction optical switch. This allows stable consecutive acousto-optic frequency-shifting modulation that significantly improves the signal-to-noise ratio. While achieving a bandwidth surpassing the state-of-the-art demonstrations based on wideband electronics, our approach alleviates the necessity for high-speed signal generators or wideband tunable lasers. To exemplify the utility, we systematically evaluate the signal quality and show its applications in radar imaging compared to those using electrical waveform generators.