Yuri, thanks for additional comments.
Srapper, rereading your reply, I realized my reply sounded like
I was suggesting not to use the ROM code. What I was suggesting
was to implement the loop as the first code of the boot code that
ROM code would load and run. I don't know any way not to run
ROM code out of POR for iMX6.
Yuri, the problem is not so much not being able to stop the ROM
code but rather not being able to communicate with TAP while
RESET is asserted. It just happens that by the time RESET is
de-asserted and the JTAG probe accesses debug registers
to halt, the rom code is already booting from devices.
This is at least what my understanding is. Please correct me if
this is wrong.
Regards
Sinan Akman