Topic : Unable to clear sticky bits(s)

Forum : ARM

Original Post
Post Information Post
April 14, 2009 - 10:44am
Guest

Hello,

We have several prototypes of our own board, with a STM32F103VBT in each one. I am using RIDE 7 v7.18.0903 with RKit-ARM v1.18.0903. I have a couple of RLink Pro (serial dngSR7P00000054 and dngSR7P00000058).

I am able to program and debug three of our prototypes but I've met some problems when dealing with the last one. I have tested the boards and all of them seem to be OK, including the one with the problems.

If I try to program the "faulty" board, I receive one of the following messages:

- If in JTAG mode:
Sometimes I get "Wrong MCU DEVICE ID: 0x0"

- If in SWD mode:
Sometimes I get "No response from the DTC"

So far, I could understand something is wrong with the micro. But the problem lies in the "sometimes" part. Using JTAG, I usually get another message: "Unable to clear sticky bit(s)", in the first try or after a "Wrong MCU DEVICE". And some times (very few times, in fact) I am able to connect to the micro and work with it but, after a period of time (say 5 minutes or about 20 operations) I get the "sticky bit(s)" message again. It can be after a reset, but also after any other operation like changing the state of an output pin.

When I am able to connect to the micro and I try to reset it after the first run of my own program, I may get two more messages: "Main not reached. Please check debug capability" and after that "Reset failed. Please check debug capability". Then the debug session has to be closed.

What bothers me is the fact that I don't get the same effects after repeating the same actions. Of course, I have used exactly the same programs in the "faulty" board as in the others, and I have tested everything with both RLinks.

Could anybody please shed a light on this issue? And more specifically, what is a sticky bit?

Thanks.

Replies
Post Information Post
+1
0
-1
April 14, 2009 - 11:43am
Raisonance Support Team

Hi,

The "sticky bits" are some (most) of the error flags concerning debugging in the Cortex. They are called like this because once the error has occurred, the debugger has to clear them explicitly before resuming normal operation if the error is recoverable. This is what it does not manage to do when it tells "unable to clear sticky bits". Or it can mean that the error reappears all the time after clearing it. You will find more information on this in the Cortex documentation from ARM.

In your case, considering that the three other boards work with the same RLinks and that the problem is intermittent, I think it is not really related to sticky bits. Rather, the problem of sticky bits is a consequence of a connection, power or clock issue. It could be a bad soldering of one of the debug signals, or a power capacitor with the wrong value, or an unstable clock.

Also keep in mind that after attempting to connect using SWD, successful or not, you must power the board OFF and ON before you can try to connect using JTAG. That can also explain some of the "sometimes" of your tests. ;)

I hope it helps,

Best Regards,

Vincent

+1
0
-1
April 14, 2009 - 3:48pm
Guest

Hi Vincent,

Thanks for your answer. I had seen only a few references to "sticky bits" in the ARM documentation, and it wasn't clear to me what they were. For example, the "Technical Reference Manual" for Cortex™-M3 (ARM DDI 0337G) is not very explanatory, just to say something...

I was already aware of the need of powering the board off when switching between JTAG and SWD, so I don't thing that my "sometimes" can be explained this way. Anyway, it's good to be remembered the basics from time to time. :-)

I thought I had thoroughly tested the boards, but you might be right, so I'll do it again paying extra attention this time, specially in the case of the solderings. I'll let you know any advance.

Thanks again.

+1
0
-1
April 7, 2010 - 10:33am
Guest

HI,

I have the same problem with a STM32F103ZCT6. For the moment I have only one board and I have never been able to program it. I stop on "Wrong MCU DEVICE ID: 0x0" and "Unable to clear sticky bit(s)"
Did you find the solution to solve this problem?

Thanks,
Damien

+1
0
-1
April 16, 2010 - 10:43am
Guest

Hi,

just for information for other user. In fact on my board, I don't power VDDA (analog power supply). without this supply, JTAG can't work.

Damien

+1
0
-1
April 29, 2010 - 10:46am
Guest

Hi Damien,

sorry for the late answer. I have just read your question.

No, I wasn´t able to make it work. As I had other working prototypes and I was in a hurry, I didn't spend too much time trying to solve it. All the solderings were OK and the power supply was also OK.

If I ever have time to look back (which is doubtful...) I'll let other users know.

Regards,

Leukocyte