Skip to main content
Visitor II
December 1, 2024
Solved

X-CUBE-RC-CALIB library

  • December 1, 2024
  • 3 replies
  • 1596 views

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.

    This topic has been closed for replies.
    Best answer by mƎALLEm

    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.

    3 replies

    Explorer
    December 1, 2024

    > 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.

    Visitor II
    December 2, 2024

    >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.

     



    Technical Moderator
    December 2, 2024

    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

     

     

    Visitor II
    December 2, 2024

    Hello @mƎALLEm, 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.

    Technical Moderator
    December 2, 2024

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

    Ticket number: 197481.

    mƎALLEmAnswer
    Technical Moderator
    December 10, 2024

    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.