Komplette-Library-Liste (STM32F746)

Die Librarys für den F746 sind Funktionskompatibel mit denen vom F429 bzw. F407

Das bedeutet die Funktionsaufrufe sind identisch somit sollten Projekte die für den F407 oder F429 geschrieben wurden sofort laufen.

Für die genaue Doku aller Librarys bitte unter den Seiten vom F407 oder F429 nachlesen (ich schreibe hier nicht nochmal alles neu).

Als LoLevel-Lib ist die HAL-Lib von ST notwendig.

Hinweis : Die “Basic-Librarys” ohne speziellen Hardwarebezug können auch für den F4 benutzt werden.

Die einzelnen source files (ohne Beispiel) findet ihr auch in meiner Dropbox :

Link : DropBox_F746

Liste :

00 = System : f746_system_v101
01 = LED : f746_led_v100
02 = Button : f746_button_v100
03 = SDRAM : f746_sdram_v100
04 = LCD : f746_lcd480272_v100
05 = FONT : f746_font_v100
06 = Graphic_2D : f746_graphic2d_v101
07 = I2c-LoLevel : f746_i2c_v101
08 = TOUCH : f746_touch480272_v101
09 = SPI-LoLevel : f746_spi_v100
10 = UART : f746_uart_v101
11 = SGUI : f746_sgui_v103
12 = uBasic : f746_uBasic_v100
13 = USB-Host-HID : f746_usb_host_hid_v102
14 = FATFS (MMC,USB) : f746_fatfs_v100
15 = USB-Host-MSC : f746_usb_host_msc_v100
16 = QFlash : f746_qflash_v100
17 = Audio : f746_audio_v101
18 = DCF77 : f746_dcf77_v100
19 = Syscheck : f746_syscheck_v100
20 = Timer : f746_timer_v100
21 = PWM : f746_pwm_v100
22 = RNG : f746_rng_v100
23 = UDP_Server : f746_udp_server_v100
24 = EXT_Interrupt : f746_exti_v100
25 = HTTP-Server : f746_http_server_v100
26 = ADC : f746_adc_single_v100

Projekte :

die Liste der kompletten OpenSTM32 Projekte, welche direkt auf dem F746-Disco laufen, findet Ihr hier.

 


46 Antworten auf Komplette-Library-Liste (STM32F746)

    1. noone sagt:

      • admin_ub sagt:

        then maybe he is better

        • noone sagt:

          HAHA, don’t worry here :)
          You are making great job also.

          I also like his libs, because they are also compatible with F4xx lines the same library. That’s cool because it allows you to easily switch between processors.

          He says he is planning to add support to F0 to libs also.

          Maybe you can do something similar.
          Why you switched to F7 lines and not to something “lighter”?
          Having 2 mainstream device support is not so necessary.

          I would suggest like he has on his web.
          One mainstream for powerful stuff and one “lowpower” like F0 or similar is. You should think about that way.

          • admin_ub sagt:

            :-) i dont have enough time to write and test code for all the different types. so i write code first for my own projects and here i need MORE POWER !!
            so not a F0 but a F7.
            and yes i know its silly to make a “led-blinky” with a 216MHz CPU :-)

            • noone sagt:

              Btw..You system is setup for 200MHz right now as I see in UB_SystemInit() is PLLN set to 400 instead of 432.

            • admin_ub sagt:

              thats right.
              200MHz Sysclock is the maximum setting
              for the external SDRAM

    2. noone sagt:

      Using proper clock period for SDRAM, MCU can work at 216Mhz also.

    3. noone sagt:


      int16_t UB_I2C1_WriteMultiByte(uint8_t slave_adr, uint8_t adr, uint8_t cnt)
      {
      int16_t ret_wert=0;
      uint16_t n;

      for(n=cnt;n>0;n–) {
      I2C1_DATA[cnt]=I2C1_DATA[cnt-1];
      }
      I2C1_DATA[0]=adr;

      // adresse und alle daten senden
      if(HAL_I2C_Master_Transmit(&I2c1Handle, (uint16_t)slave_adr, (uint8_t*)I2C1_DATA, cnt+1, I2C1_TIMEOUT)!= HAL_OK)
      {
      ret_wert=-1;
      if (HAL_I2C_GetError(&I2c1Handle) != HAL_I2C_ERROR_AF) ret_wert=-2;
      }

      return(ret_wert);
      }

      Bug in copying maybe? Check for loop, I2C library.

      • admin_ub sagt:

        ahhh..i have tested it with an i2c-eeprom and have seen the bug,
        but i assumed the eeprom is too slow to write multible bytes.
        THANKS for the report it should be fixed now.

    4. Piotr sagt:

      Do you have in plans SGUI for f746?

      • noone sagt:

        Problem of SGUI is that it is not portable between versions.
        It didn’t do “low level functions” where you can port what you need for specific LCD. So he has some work to do to everywhere replace everything.

      • admin_ub sagt:

        it’s no big deal and already online.
        default mode is “landscape” but “portrait” is also working.

    5. Piotr sagt:

      Thank You, all clear, be try…

    6. noone sagt:

      I have tested my 4 mouses, with your example for HID host. Noone works.

      • admin_ub sagt:

        yes, i think the ST-HAL Librarys are buggy.
        I have the same problems with a usb-keyboard,
        but i have testet two mouse and both worked.
        The new Lib for FATFS have also a problem with a single 1gb sd-card
        a 8gb works, but i dont search failures in the code from st :-)

    7. noone sagt:

      Before releasing library, check ST examples first and test if it works.

      • admin_ub sagt:

        thats exactly what i do :-) the original examples from st also dont’t work
        (Applications\FatFs\FatFs_uSD\ and Applications\USB_Host\HID_Standalone\).
        try it by your own.

    8. noone sagt:

      How can I use MSC host and HID host at the same time?

      It is not supported, right?

      Btw..for me all examples work OK.

      • admin_ub sagt:

        “should” work but i dont have tested it (i have only one micro-usb adapter)
        add both defines : “USE_USB_FS” and “USE_USB_HS”
        and include all files from the “usb” directory (from MSC and HID)
        than HID should run on HSB-FS (CN13) and MSC on USB-HS (CN12)

      • admin_ub sagt:

        if the st examples works…then maybe its a problem with the IDE
        can you send me your compiled BIN-File from the “HID_Standalone”
        or the “FatFs_uSD” demo ? so i can verify this with my hardware.

    9. noone sagt:

      “Should” work..it does not, because you have multiple defines and you don’t have corectly defined OTG irq handlers, so it can’t work.

      It can be IDe, because my friend uses IAR and there MSC does not work at all. The same code, just MDK-ARM, works very good. We already found a bug in MSC HOST library from ST. You can edit if need.

      usbh_msc.c line 446

      WRONG (v2.3.1)
      if((phost->Timer – MSC_Handle->timer) > 10000)

      CORRECT
      if((phost->Timer – MSC_Handle->timer) < 10000)

      • admin_ub sagt:

        please download version 1.2 from my “usb_host_hid” library
        then there should be no conflict anymore.
        and thanks for the bugreport.

      • admin_ub sagt:

        i have added a second demo with usb-hid and usb-msc at the same time.
        its working on my hardware. you can add SD-Card if you want
        with the source from the first demo.

    10. noone sagt:

      No offense, great job from you, but your programming concept is not thinked so great.
      Doing multiple files for different combinations is not good.

      You should think about single library for multi purposes.
      In your case, USB lib is not flexible as it could be.

      Just my thinking, ignore it if you think otherwise ;)

      • admin_ub sagt:

        there are no multible files (since version 1.2 from HID).
        USB-HOST needs a couple of files who are the same for HID and MSC
        and there are different files special for HID and special for MSC.

        for USB-HOST you need 11 Files (*conf,*core,*ctlreq,*def,*ioreq,*pipes)
        if you want HID : copy also the 9 HID-Files (*hid)
        if you want MSC : copy also the 6 MSC-Files (*msc)
        if you want both HID and MSC you need all 15 Files (*hid, *msc)

        i think thats easy to handle

    11. noone sagt:

      I know all that more than you think.
      I just wanna tell you that you should make this more “portable”.
      What, when new stack version comes out with fixed settings? You have more work to do.
      What, when you wanna add more classes? Again, copy everything.

      My suggestion to you is: Use one files which are common to all in single folder or something like that. Don’t copy/paste files for each library. It just does not work well :)

      Again, just my opinion, ignore if you think other way :)

      • admin_ub sagt:

        yes, you are right. but at the moment it works fine for me.

    12. noone sagt:

      Hi,

      I just found his example: http://stm32f4-discovery.com/2015/08/hal-library-21-multi-purpose-usb-library-for-stm32fxxx/

      I think you could do something like that. Very easily portable, and very usable in different modes. With a lot of examples.
      You should think about that :)

    13. JM sagt:

      Hallo Uwe,

      erstmal vielen Dank für deine Mühe hier und das teilen deiner Libariers. Hilft wirklich weiter , bis Weilen hatte ich nur mit ATMELs (nur Hobby) zu tun aber seitdem ich an einem größeren Projekt beteiligt bin, hat mich der STM32 ganzschön in den Bann gezogen und deine Seite hilft mir doch sehr beim lernen & studieren.

      Ich habe mir vor kurzem den STM32f7 zugelegt, leider habe ich hier ein Problem bei der Implementierung und würde dich gerne um Hilfe bitten. Um hier unnötiges zu vermeiden habe ich den Build Ouput bei pastebin veröffentlicht. Wie du merken wirst sind verschiedenste identifier – undefined. Und ich weiß nicht weiter…

      Hier der Link :

      http://pastebin.com/3fCd7V5Q

      Grüße übrigens aus dem Nachbarort Eschelbach :-) Naja fast, Wahlheimat ist nun Berlin.

      • noone sagt:

        Add DMA2D graphic libraries to your project from HAL.

        • JM sagt:

          Hi Noone,

          i’m using Keil so as recommended (here :http://mikrocontroller.bplaced.net/wordpress/?page_id=5340) i added the folder “stm32f746g-disco_hal_lib” into my project file furthermore i added to my main.c :

          #include “\stm32f746g-disco_hal_lib\CMSIS\core”
          #include “\stm32f746g-disco_hal_lib\CMSIS\Device”
          #include “\stm32f746g-disco_hal_lib\HAL-Driver\Inc”
          #include “\stm32f746g-disco_hal_lib\HAL-Driver\Inc\Legacy”

          unfortunately it still doesn’t work. Any ideas ?

    14. noone sagt:

      you have to find a file called stm32f7xx_hal_dma2d.c and include to project. It is there for sure.

      • JM sagt:

        I will update the driver folder. Unfortunately ST.com is down, will do it later. Thank you so far anyways, i will post here my progress.

      • JM sagt:

        Hi Noone,

        i’m getting closer and closer. But something is still missing :

        http://pastebin.com/PiZw5Fr4

        Any idea ?

    15. noone sagt:

      Just add all .c files to project and you are done!

    16. JM sagt:

      I did replace the HAL librarys with and also i add them all but still 21 Errors to see :

      http://pastebin.com/yXc9jzPz

      can’t explain that to myself

      • JM sagt:

        So now i did following i added to

        stm32_ub_sdram.c :

        #include “stm32f7xx_hal_sdram.h”
        #include “stm32f7xx_ll_fmc.h”

        stm32_ub_i2c3.c :

        #include “stm32f7xx_hal_i2c.h”

        smt32_ub_graphic2d.c :

        #include “stm32f7xx_hal_dma2d.h”

        works well so far but then new 14 Errors :

        http://pastebin.com/8E9XJ0y1

        Could please somebody help me ? I’m sitting since 4 hours on it, you can also answer me in german.

        • Frowin sagt:

          Could it be that you defined e.g. “LCD_CurrentLayer” in “stm32_ub_font.o” and in “main.o”?

          But it should be defined just once and then you have to refer to this define….
          e. g. with “extern defines” ?
          But it could be totally wrong what I mentioned here… ^^

      • admin_ub sagt:

        @ JM,

        STOP !!
        in meinen Files (und denen von ST) muss nichts geändert
        bzw. hinzugefügt werden !!

        mache nochmal ALLE änderungen rückgängig
        (kopier am besten nochmal die original Files)

        du hast folgenden Satz von mir falsch verstanden
        “Danach braucht es in eurer IDE diese 4 Include Pfade :”

        das bedeutet nicht, das in der Main.c per “#include”
        diese 4 Zeilen hinzugefügt werden müssen,
        (ein include kann sowieso keine Pfade sondern nur Files einbinden)
        sondern du musst in KEIL die Suchpfade um diese 4 erweitern
        (k.A. wie das in KEIL funktioniert)

    17. linuxStarter sagt:

      Gibt es hier auch Interessierte am STM32F4 und/oder F7
      ucLinux ?

      http://www.emcraft.com/products/343#documentation

      http://www.emcraft.com/products/503#how-to

    18. Claus sagt:

      Schade, dass ihr euch so auf MMBasic versteift …
      STM32F7 Libraries zu UDP / TCP wären der Hammer =)

      Dennoch vielen Dank für eure coolen Libs.

    19. Piotr sagt:

      Hello Uwe
      In Your very good projects path must have “/” (slash) for correct compile under Linux. Is possible to make template project with one header file devided on sections for DMA, LCD, UART, … etc? Next projects based on this template be have only new files linked to precompiled “ST HAL” and “UB_Libs”.

    20. hal sagt:

      Hallo.
      Durch die Verwendung des f746_sdram_v100, wird der Bildschirm instabil.
      Ich habe versucht, an verschiedenen Orten zu schreiben.
      Hat jemand das gleiche Problem?

      Gruß

      • admin_ub sagt:

        was bedeutet “instabil” bei welcher aktion und zu welchem Zeitpunkt ?

    21. spec sagt:

      Hi,
      kann mir jemand auf die Sprünge helfen? Ich lese mir gerade die libs durch, aber kann nirgends
      UB_LCD_DrawPixel()

      finden

      • admin_ub sagt:

        der Bezeichnacher nach “UB_” verweißt auf die Library…hier also LCD
        genauer “stm32_ub_lcd_480x272.c”

    22. Victor sagt:

      Is it possible to get a CAN BUS example for STM32F7 DISCOVERY?

    23. Victor sagt:

      Is it possible to get a CAN BUS example for STM32F7-DISCO?

    24. DerItist sagt:

      Hallo,

      erstmal vielen Dank für die tollen libs.

      Habe beim Nutzen der timer lib das Problem das die interrupt funktion nicht ausgeführt wird.

      hier der code:

      #include „stm32_ub_system.h“
      #include „stm32_ub_led.h“

      #include „stm32_ub_lcd_480x272.h“
      #include „stm32_ub_font.h“
      #include „stm32_ub_graphic2d.h“

      #include „stm32_ub_adc1_single.h“

      //#include „stm32f7xx_hal_adc.h“

      #include „stm32f7xx_hal.h“

      #include „stm32_ub_i2c1.h“

      #include „stm32_ub_tim2.h“

      #include „stm32f7xx.h“
      #include „stm32f7xx_hal.h“

      char str[10];
      char str1[10];

      volatile uint16_t adc_wert;
      int main(void)
      {
      UB_System_Init();

      UB_Led_Init();

      UB_ADC1_SINGLE_Init();
      UB_I2C1_Init();

      UB_LCD_Init();
      UB_LCD_LayerInit_Fullscreen();
      UB_LCD_SetLayer_2();
      UB_LCD_FillLayer(RGB_COL_GREEN);
      UB_Font_DrawString(10,20,“F746 ADC (21.08.2016 / Itist v1)“,&Arial_10x15,RGB_COL_RED,RGB_COL_BLACK);
      UB_Graphic2D_DrawFullRectDMA(10,40,100,50,RGB_COL_BLUE);

      // Init vom Timer2
      // mit f = 1 Hz
      UB_TIMER2_Init(8399,9999);

      // Timer2 starten
      UB_TIMER2_Start();

      while(1) {

      adc_wert=UB_ADC1_SINGLE_Read(ADC_PA0);
      sprintf(str,“PA0 = %4d“,adc_wert);
      UB_Font_DrawString(10,100,str,&Arial_10x15,RGB_COL_BLACK,RGB_COL_GREEN);
      }

      }

      //————————————————————–
      // ISR von Timer2
      //————————————————————–
      void UB_TIMER2_ISR_CallBack(void)
      {
      UB_Led_Toggle(LED_GREEN);
      }

      Nutze eine stm32f746GG disco Board und die System Workbench IDE.
      Hat hier jemand eine Idee an was das liegen könnte?

      Vielen Dank im Voraus.

      Gruß
      Oliver

    25. DerItist sagt:

      Hallo,

      ich habe eine Lösung gefunden.
      in der Datei: startup_stm32f746xx.s

      fehlten die Einträge unter external interrupts.

      Habe die Datei aus dem Pacman Projekt reinkopiert und umbenannt dann lief es auf Anhieb. Hoffe dies ist eine Gute Lösung!

      Gruß
      Oliver

    26. Hallo Uwe,
      nach mehreren Tagen Ärger mit der AD- Wandlung habe ich eine Lösung gefunden:
      In der Datei ub_adc1_single.c (und den beiden anderen) führte die Zeile 71 zu Fehlern, (keine AD- Wandlung). Ich habe sie auskommentiert, und schon lief alles bestens:

      if(HAL_IS_BIT_CLR(HAL_ADC_GetState(&Adc1Handle), HAL_ADC_STATE_REG_EOC)) return 0;

      Möglicherweise stimmte bei mir die Konstante HAL_ADC_STATE_REG_EOC nicht.

      Trotzdem vielen Dank für Deine Mühe!!
      Wolfgang Kiefer (DH1AKF)

    27. Jonas sagt:

      Erstmal vielen Dank für die vielen Informationen.

      Ich spiele gerade mit dem Audio FFT Beispiel ein wenig herum. Ich habe den Eingang erfolgreich auf vom Mic Line-In umgeschrieben. Jetzt wollte ich noch ein “Durschleifen” implementieren, wie bei dem Beispiel mit dem Mikro.
      Aber irgendwie scheint es nicht zu gehen. Da es im Code so auch nicht vorgesehen war, bin ich mir nicht so genau sicher, ob es überhaupt geht.

      Ich habe mir das Board gekauft um ein par kleine Audio Effekte umzusetzen. Die nächste Frage wäre auch wie ich den Code umschreibe. Um die Signale sinvoll zu buffern, bearbeiten und wieder aus zu geben.
      In dem Beispiel ist der Audiocode recht stark mit dem Grafikcode verwoben, sodass es mir als Einsteiger nicht so leicht fällt, den Code wie gewünscht abzuändern.
      Eigentlich sollte das viel leichter sein, als die Aufgabe, die in dem Beispiel gelöst wurde.

    28. fei sagt:

      Hello Uwe,

      thanks for sharing your Projects, however I have problenms compiling them.
      Right now I’m trying to compile the SGUI Project, but I get so many “unresolved references” errors in “stm32_ub_xxx” files, although I have already included the hal header files, do you know what could be the possible reason here?

    29. Hallo Uwe,
      vielen Dank für die Veröffentlichung Deiner Library und der Beispiele!
      Siehe
      https://www.mikrocontroller.net/topic/418585?goto=4898503#4898503


Wie hat Dir dieser Artikel gefallen?

1 Stern2 Sterne3 Sterne4 Sterne5 Sterne (Noch keine Bewertungen)
Loading...

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert