2025-10-29 12:45 PM - last edited on 2025-10-30 2:45 AM by Andrew Neil
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 ?
2025-10-29 3:08 PM
That's the whole idea of live expression. It updates live.
2025-10-30 2:42 AM
Hello @VidhiPa
In addition to the suggestion of @Karl Yamashita, you can also Set breakpoints at points of interest and inspect variables when halted.
2025-10-30 2:49 AM
@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.
2025-10-30 5:00 AM
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.
2025-10-30 5:06 AM
@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.
2025-10-30 5:27 AM
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).
2025-10-30 6:47 AM
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.
2025-10-30 7:41 AM
> ...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.