JTAG frequency is being set on the side of debugger, for instance here (considering TRACE32 debugger):

So it you change frequency significantly wanting to keep debugging during this "slow mode", you change this clock to keep 1/4th of the core frequency or you can have set for such slow clock for the whole time.