Trying to boot from bootloader in STML152 although not present

I am doing a STM32L152 design, using IAR tools, and have run into problems with JTAG programming. My code resides in Flash, and sometimes there is a JTAG "no communication" problem which prevents me from programming. Everything locks up. I was advised to try another boot mode to force it to communicate. I have used system bootload, except there is no bootloader according to the errata sheet.

Does anyone know what happens when there is this attempt?

Secondarily, does anyone know what clock selection is invoked in this mode - what speed?

There have always been problems for me to connect to a device after a reset when one of the sleep modes is used. I assume, that you are using sleep modes, too (would not make much sense to use a STM32L without....)

My workaround: When debugging, I always insert a delay after reset or wait for a switch before going to sleep for the first time.

Besides that, everything works quite well. I use IAR or Atollic with ST-Link and SWD. The only thing I discovered until now: The debugger connection gets lost when running the CPU on MSI with clock frequencies below 256kHz.

There have always been problems for me to connect to a device after a reset...

I think it's even more general than that, it's more to do with the thousands of cycles the JTAG is taking to wrestle control after the reset. As you said putting in a loop or doing some busy work first will mitigate it somewhat, and most JTAG pods have several options/configurations for the boot/reset strategies to use.