logo elektroda
logo elektroda
X
logo elektroda

HY-Mini STM32F - I am looking for a library to support PLL SI5351A synthesizer

Aimeiz 3270 14
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16120727
    Aimeiz
    Level 16  
    Hello.
    I am looking for a library to support the Adafruit module with the PLL SI5351A synthesizer, for the STM32F103 processor (HY-Mini board).
    Controlling the module via I2C.
    There is a library available for Arduino, but porting is not easy for me at least.
    Maybe someone found it on the web, or made such a porting for personal use and to share it.
    Unfortunately, the only synthesizer to which I found the library is the AD9850 DDS chip, but it's a completely different story - controlled by GPIO and not by I2C.
    The library for Arduino is on the page:
    https://github.com/etherkit/Si5351Arduino
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • #2 16120768
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • #3 16120806
    Aimeiz
    Level 16  
    Thanks for the hint.
    The library to support I2C by this processor is available, but the linking of these libraries is not trivial, at least for me.
    The Arduino library uses Arduino calls. This is not pure C and the I2C library for STM32 has a different philosophy and set of functions than the one for Arduino.
    I do not know what Cube is and I do not know what HAL is.
    As a STM environment, I've used Cocoide so far.
  • #4 16120813
    Anonymous
    Anonymous  
  • #5 16120901
    rb401
    Level 39  
    Aimeiz wrote:
    I do not know what Cube is and I do not know what HAL is.


    There is a CubeMX / HAL course on forbot.pl under the name STM32F4. Where at the same time is a description of how to start, what tools you need, etc.
    It is true that you have a different board, a different processor, but generally because the HAL libraries are relatively the same for different families, it will be very similar.
    And there, too, is touched on the topic of I2C by HAL.
  • #6 16344505
    Aimeiz
    Level 16  
    I see that it has changed a lot since the last time I played programming these cubes.
    So far, I've postponed the topic.
    On the Russian shortwave forum is the entire software driver, but on a different board with STM32F4.
    There is also a library there, but I did not have time to take care of it. Author very kind and willingly answer all questions.
  • ADVERTISEMENT
  • #7 16344754
    BlueDraco
    MCUs specialist
    You can find information about the Arduino environment for STM32 at www.stm32duino.com. Maybe it's the easiest path for you.
  • #8 16344770
    Anonymous
    Anonymous  
  • #9 17109417
    Aimeiz
    Level 16  
    I am playing Arduino for STM.
    Cool thing - I'm training Maple Mini and BluePill tiles.
    I wonder if Hy-Mini can be programmed.
    I see that Discovery is supported, for example.
  • #10 17110439
    ghost2000
    Level 18  
    Aimeiz wrote:
    The Arduino library uses Arduino calls. This is not pure C

    Are Arduino calls not written in C or C ++?
  • #11 17110851
    Aimeiz
    Level 16  
    Sure that C and C ++.
    Only in this is it possible that it all fits together.
    Recently, I have been adapting the piant project to Arduina AVR for tiles on STM3210C and of course, compiling is being done, or the program is compiling, but it does not work as it should.
    In general, it ends in small changes in the program, libraries, or even parameters, but it is often difficult to find out what and how to change.
    However, it is worth to lean on it, because the BluePill plate for $ 2 has the capacity and speed greater than the Arduino Mega. Mniwj fits, because Maga2560 has 256kB flash and STM32F103C - 128KB.
  • #12 17110896
    ghost2000
    Level 18  
    Aimeiz wrote:
    Mniwj fit, because Maga2560 has 256kB flash and STM32F103C - 128KB.

    How many friends wrote programs on uC occupying more than 128kB?

    Aimeiz wrote:
    Recently
    Aimeiz wrote:
    been adapting the project piosany to AVR to the tiles on STM3210C and of course, the compilations are dumped, or the program is compiled but it does not work as it should.
    In general, it ends in small changes in the program, libraries, or even parameters, but it is often difficult to find out what and how to change.

    When it comes to whole programs, yes, it requires a lot of work, while libraries, especially when they are written with their heads, move without much problem. I often do this, transferring libraries from Arduino, less often from other sources. Of course, you will not be able to read the circuit notice, in this case SI5351. As you move the library, you need to know what functions are doing, what the individual registers are for. Without knowing the layout, moving the library will rarely succeed. You do not need to know the system from the inside, usually a brief acquaintance of it is enough.
  • #13 17110981
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • #15 17442646
    Aimeiz
    Level 16  
    2675900 wrote:
    Aimeiz wrote:
    course, compiles

    A few questions:

    What are compilations?
    What does it mean that they are dumped?
    Is such a compilation | (| even one) heavy? Does it not resist when being carried.


    I answer questions:
    1. I mean the process of compiling and linking the program as a whole
    2. I mean the end of the compilation with errors that make it impossible to get the result code
    3. I do not understand what "heavy compilation" means

    These compilation errors can be very easy to correct.
    eg changing the definition of values from the #define directive to the declaration of a variable with an assigned value, or a constant to match the library that you use.
    Sometimes programs stop when they are executed. It is usually harder to fix, but it gives.

    Added after 9 [minutes]:

    [quote = "ghost2000"]
    Aimeiz wrote:
    Mniwj is located, because Maga2560 has 256kB flash and STM32F103C - 128KB.

    How many friends wrote programs on uC occupying more than 128kB?

    In my case it is participation in teamwork.
    There are projects being carried out on forums for several years and everyone makes their own money, and the main ringleader prevails over it.
    Quite quickly, large codes come out of it and do not fit in small cubes, especially when you want to have a lot of functionality, which is chosen by incorporating modules by using conditional compilation.

    STM modules used for Arduino np maple mini are similar to Arduino Nano. Arduino Mega is a big tile. Sometimes the dimensions are important.

Topic summary

The discussion revolves around finding a library to support the SI5351A PLL synthesizer module with the STM32F103 processor on the HY-Mini board, specifically for I2C control. The user notes the availability of an Arduino library but faces challenges in porting it due to differences in I2C implementations and programming paradigms between Arduino and STM32. Responses suggest using STM32CubeMX and HAL for initialization and I2C support, with recommendations for resources and courses to aid in understanding these tools. Some participants mention alternative platforms like STM32duino and mbed as potential solutions. The conversation also touches on the complexities of adapting libraries and the importance of understanding the underlying hardware and software architecture.
Summary generated by the language model.
ADVERTISEMENT