We propose a novel light source for the optical fast frequency-hopped code-division multiple-access scheme using a self-seeded gain-switched Fabry-Pérot laser diode (FP-LD) with the reconfigurable fiber Bragg grating array (FBGA). The embedded FBGA in the external cavity loop encodes the input pulses both temporally and spectrally. Before feeding back into the FP-LD, the encoded optical pulses propagate the FBGA with reverse direction and are again temporally combined. With the corporation of the variable fiber delay line, the limitation of the pulse rate by the fixed external cavity length is removed and makes the scheme more flexible. The output with sidemode suppression ratio of more than 20 dB has been obtained. With three fiber Bragg gratings on the FBGA, we demonstrate the encoded chip rate of 1.425 GHz under the driving radio frequency of 475 MHz. It is proved that a different codeword can be generated by simply reconfiguring the encoder without changing the rest of the experimental setup.