2011-06-30 02:11 PM
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?2011-06-30 10:16 PM
What JTAG device are you using? IAR doesn't support all the JTAG dongles equally well. Have you tried using a different dedicated programming utility for your JTAG dongle?
2011-06-30 10:52 PM
I am using the J-Link Ultra. It was tech support at IAR who suggested forcing a boot from another space than Flash.
2011-07-01 01:35 AM
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.2011-07-01 04:39 AM
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.