It sounds to me like the flame detector is shot. When a flame generated heating device turns the main burner on, it normally has a detector that determines the burner is actually burning. If it isn't, or it thinks it isn't, it will shut the gas off, then wait awhile for the unburned gas to 'purge' out of the chamber, then try again. Your system is not getting the signal that it actually lit. Could be dirty, could be out of position, could be bad, or the main board that signal goes to could have a bad receiver, and not see the good signal. Most common is a dirty sensor. There's often a way to test them, but you'd need the spec sheet or diagnostics and the proper tool (often a multimeter).
Note, some burners have a maximum burn time, and will shut off, even if the set point isn't reached, for a few minutes before firing again. This is much longer than a few minutes, though, and wouldn't give an error code.