cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-RC-CALIB library

JavierRomann
Associate II

Currently, I am working on an STM32L432 microcontroller, emitting a 20 kHz sine wave. The code is relatively simple, although I am getting a slightly different frequency. I have been looking for solutions and found an embedded software package called RC-CALIB as a relatively cheap solution to this.

However, I cannot load the package on my CUBE IDE, even though the software was downloaded directly from the STM website. The latest version is from 2015.

Thanks for your time.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @JavierRomann ,

I've got the feedback. As I said as the package was not listed in Software Package in STM32CubeMx, it's not a standard CubeMx standard package. So you need to copy and add the files manually to your STM32CubeIDE project.

Hope that answers your question.

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.

View solution in original post

6 REPLIES 6
Ozone
Lead II

> However, I cannot load the package on my CUBE IDE, even though the software was downloaded directly from the STM website. The latest version is from 2015.

It was surely not designed as a "Cube IDE" project. Although I must admit, I don't know this library, nor do I use Cube.
If it is compatible with Cube, i.e. gcc format, you can try to add it as a link library in the build settings - if you can retrieve the respective API headers.

> Currently, I am working on an STM32L432 microcontroller, emitting a 20 kHz sine wave. The code is relatively simple, although I am getting a slightly different frequency. 

Your question suggests you don't use a quartz oscillator, which would provide sufficient accuracy. Why not ?

Second, I'm not sure what you mean with "slightly different frequency". I would add debug code, i.e. toggling an additional GPIO upon each zero crossing of the generated curve. Thus you could measure the effect of a MCU clock drift with a scope, assuming consistent code.
But perhaps other interrupt-driven code messes up your timing. I suppose you use the internal DAC, controlled via a timer interrupt.

>Your question suggests you don't use a quartz oscillator, which would provide sufficient accuracy. Why not ?

 

The idea is making the device wearable, so space reduction is very important.

 

>I'm not sure what you mean with "slightly different frequency".

 

This is because I need clock precision in the range of Hertz, but I am observing deviations of around a hundred. According to the microcontroller's datasheet, I should expect errors of about 0.25%(with trimming), but my results are far from that.

I will try using External MEMS Oscillators or a crystal oscilator, and trying to debug my code.

 

Thank you for sharing your expertise on this topic.

 



SofLit
ST Employee

Hello @JavierRomann and welcome to the community,

How did you load that package to "CubeIDE"? 

It's not available in the list of CubeMx: Software Packs / Manage Software Packs / STMicroelectronics:

SofLit_0-1733133995722.png

 

 

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.

Hello @SofLit, thanks for your reply!

 

I load it via manually by the "From Local..." button. The expansion was downloaded via STM page https://www.st.com/en/embedded-software/x-cube-rc-calib.html.

 

 

Thank you very much for your time and assistance.

SofLit
ST Employee

I don't think this is possible as CubeMx doesn't list it. Meanwhile, I will escalate your request for conformation.

Ticket number: 197481.

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.

Hello @JavierRomann ,

I've got the feedback. As I said as the package was not listed in Software Package in STM32CubeMx, it's not a standard CubeMx standard package. So you need to copy and add the files manually to your STM32CubeIDE project.

Hope that answers your question.

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.