cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2 Erasing Flash kicks out my Debugger (Raisonance R-Link)

grant
Associate III
Posted on April 03, 2015 at 08:26

Hi there

I have a slightly irritating issue where I am erasing a block of flash memory and while erasing it always kicks my debugger out.  I get a ''Debugger has lost communication message''

I am using an STM32F207VCT6 running Ride7 with the R-Link debugger connected to SWD.  

The problem occurs while waiting for the Busy Flag in the Flash Status register to clear.  The offending section of code is in the FLASH_WaitForLastOperation section of the stm32f2xx_flash StdPeriph Driver, just after the erase has been initiated.

  /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset.

     Even if the FLASH operation fails, the BUSY flag will be reset and an error

     flag will be set */

  while(status == FLASH_BUSY)

  {

    status = FLASH_GetStatus();

  }

The code continues to run, it just kicks out my debugger.  I have tried:

- Disabling interrupts

- Running the Flash routines in RAM

- Querying the busy flag manually (not using FLASH_GetStatus)

No joy.  If I single step it is fine.

This is not a show stoppper but is rather annoying and I was wondering if anyone else has had a smiliar issue and solved it?  Sounds like some kind of timeout in the R-Link but it would be great to be sure.

Thanks and regards

Grant

3 REPLIES 3
AvaTar
Lead
Posted on April 03, 2015 at 09:42

Sounds like some kind of timeout in the R-Link but it would be great to be sure.

 

I would guess so, too.

Raisonance tools are not so popular here, not sure if people monitoring this forum could help. But Raisonance has a forum itself, which would probably be the more appropriate place to ask.

I had a login there about three years ago, when my company used their tools for a STM8 based product. But be prepared for longer delays, as this forum has ''heavy'' moderation - at least they had then.

grant
Associate III
Posted on April 05, 2015 at 07:10

Hi there

Thanks for the response.  What is the most popular/common development environment/debugger used by the folk here on these forums?  I have had a few annoying things like this and am open to change, but what to change to is always the question.

Thanks and regards

Grant

AvaTar
Lead
Posted on April 05, 2015 at 12:16

Depends on your 'orientation' and preferences.

For professional development, tools from Keil and IAR are considered worth the money - at least by most companies. They are mature and stable. The free versions, however, are crippled in maximal code size, I view them as mere appetizers.

There is Atollic TrueStudio for Eclipse lovers, but less stable IMHO.

Last but not least, there is Crossworks from Rowley. It is derived from gcc (like Atollic), and offers an affordable licence for private use (I personally have one). Additionally, it supports Linux as host system, which was one important point for me.

And there are free tools, which usually implies you need to invest more time in stuff others do ''out of the box''. Famous one's are CodeSourcery Lite (toolchain only, no IDE), YAGARTO (gcc+Eclipse), CoIDE (gcc+Eclipse), and EmBlocks (an embedded-specific CodeBlocks - spin-off).

Perhaps other posters can add some more suggestions.

But finally, you need to decide by your criteria, like

 - IDE (editing, debugging)

 - compiler (quality, codesize)

 - MCU/core support

 - debug pod support

 - host OS support

 - price

 - custom support/community,

just to name some.