cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: RTC only works if debug breakpoint is set. I use STM32L071K8 and Cube IDE and Segger JLink. No matter if LSE or LSI is used, same problem.

Oliver R.
Associate III
 
1 ACCEPTED SOLUTION

Accepted Solutions

> ST limits the number of characters in the "ask question" field !

You are not supposed to ask question in the "ask question" field. That field is for Subject. Ask the question in the normal editor pane below that.

I know it's confusing, it's because ST uses salesforce instead of proper forum software and was both unwilling and unable to change that field's name for the whopping 4 or 5 years or how long it is.

> I test it with a firmware in my target application

We here have a very limited access to clairvoyance, i.e. we don't see clearly enough the relevant details of your application through our Crystal Cubes (or Tesseract).

But let me try: maybe you have BYPSHAD=0 and don't read date after time.

JW

View solution in original post

5 REPLIES 5

> RTC only works if debug breakpoint is set.

What do you mean by "works", exactly? How do you test that? What are the observations and how are they different from expectations?

JW

Oliver R.
Associate III

Thank you for your reply.

Sorry for the lack of details, ST limits the number of characters in the "ask question" field !

The RTC is supposed to run, which means, every second increase the second-value etc.

I test it with a firmware in my target application: A STM32L071K8U3 with a Newheaven Display (3.12 type), and using a Segger JLink and a debugger.

Everything works, the time is displayed, but it doesn't advance.

When i debug my firmware and use breakpoints and examine the RTC hardware registers, it appears that the RTC hardware registers doesn't change ( except the subseconds value for whatever reason ).

But sometimes, if a breakpoint is reached and I step into and over my code, then the RTC hardware registers sometimes suddenly change. If this happens, also the time displayed on my display change.

I checked a lot already, for exmple, using the internal clock (LSI) instead of my 32.768 crystal (LSE). Same problem, so I assume it is not a problem of my crystal.

> ST limits the number of characters in the "ask question" field !

You are not supposed to ask question in the "ask question" field. That field is for Subject. Ask the question in the normal editor pane below that.

I know it's confusing, it's because ST uses salesforce instead of proper forum software and was both unwilling and unable to change that field's name for the whopping 4 or 5 years or how long it is.

> I test it with a firmware in my target application

We here have a very limited access to clairvoyance, i.e. we don't see clearly enough the relevant details of your application through our Crystal Cubes (or Tesseract).

But let me try: maybe you have BYPSHAD=0 and don't read date after time.

JW

You worte "You are not supposed to ask question in the "ask question" field."

Is that a joke ? Read it again.

I used the field which is limited to 255 chars.

You worte "We here have a very limited access to clairvoyance, i.e. we don't see clearly enough the relevant details of your application through our Crystal Cubes (or Tesseract)."

Do you expext me to send the source code, schematics and PCB layout ? Then why not just say so but being sarcastic ?

I also have no crystal ball, cube, tesseract on any n dimensional type of solid telling me what you need to know to answer my question.

If I had, I just asked IT instead of letting myself being intimidated (*) that way.

The only cube I have is CubeIde.

Apart from that, your reply helped me to solve my problem with a workaround, indeed by reading the registers twice, so thank you for that (see attachment).

🙂

(*) By you using the word "we" instead of "i", to appear as being more than one person against only me.

Hi Oliver,

sorry for the sarcasm. Glad you got it working.

Thanks for the thanks! 🙂

Jan