cancel
Showing results for 
Search instead for 
Did you mean: 

change live expression Update rate in IDE

VidhiPa
Associate II

The STMcube IDE1.18.0  updates live expression very fast. How can I reduce the update rate, if possible?

How to accurately read ADC value for sensor calibration in this case ?

 

8 REPLIES 8
Karl Yamashita
Principal

That's the whole idea of live expression. It updates live.

  1. Print the values to a UART peripheral.
  2. You can pause debugging to view the value
  3. Slow down you ADC conversion so live view is updated at a slower rate.
If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source

Saket_Om
ST Employee

Hello @VidhiPa 

In addition to the suggestion of @Karl Yamashita, you can also Set breakpoints at points of interest and inspect variables when halted.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om
Andrew Neil
Super User

@VidhiPa wrote:

How to accurately read ADC value for sensor calibration in this case ?


That's a separate question!

For this, I'd use output to a UART (or similar) as @Karl Yamashita suggested.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yes, of course I understand that. I use workarounds like UART, but older version of STMCube IDE has it updated slowly than this version, so I wanted to know if there is a way to modify this. 


@VidhiPa wrote:

I use workarounds (sic) like UART, . 


In this application, I wouldn't call a UART (or similar) a "workaround" - I'd say it's a more appropriate approach to the problem.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

I suspect your idea of checking the ADC via "live expression" is not workable.

With an unknown signal, unknown "live expression" udate rate and unknown ADC sample rate (to us), what is the point ?  And mind you, the human eye and mind have limited reading and processing capabilities as well.

The live expression view is fine to check the ADC results for static signals, e.g. from a potentiometer. 

For dynamic signals, either use semihosting, UART, or a similiar output approach (SPI, I2C). But care must be taken that the additional code does no impact the application timing negatively.

An alternative is to add instrumentation code to buffer a sampling sequence, and either transfer it to the PC afterwards (or simply view it in a debugger).

Yes i understand, and in fact I have used UART in the past, also live expression eg. to calibrate constant dc, but it is becoming impossible to see a constant number using the updated version. I should have been specific in asking question, but it isn’t about alternative methods, but rather whether there’s a specific setting to reduce it — similar to slower update rare in the older version — in case I might have missed it.

Anyways thank you for your inputs. I understand there is no such thing. 

> ...but rather whether there’s a specific setting to reduce it — similar to slower update rare in the older version — in case I might have missed it.

If there is any such option at all.
I remember a similiar discussion lately, but didn't follow it because I don't use CubeIDE.

I suspect the update rate is allways "full speed", but what that means depends on your debug adapter and configuration (transfer size).
In other words, I suppose back-to-back transfer using all available bandwidth of the used channel.