Boundary scan functionality of JTAG for onboard Flash programming
Assuming the processor you are referring to has boundary-scan cells behind the pins that are connected to the Flash device you want to program, you should be able to program the Flash with JTAG/boundary scan without involvement of the processor's core.
There are also some other JTAG based programming methodologies that can help to speed up the programming compared to boundary-scan based Flash programming (which is relatively slow).