Skip to main content
Graduate II
June 17, 2024
Solved

Zephyr: how DAC on STM32H723ZG ?

  • June 17, 2024
  • 2 replies
  • 2587 views

Dear all,
does anyone have experience with setting analog output signals via Zephyr RTOS? I managed to get the D/A conversion on the Nucleo H723ZG to run via STM32CubeIDE, but I’m running intro trouble when using Zephyr. Apparently a "DAC" driver is required, however the documentation is not very clear.

Thanks 

    This topic has been closed for replies.
    Best answer by Sarra.S

    Hello Lysandros, 

    Sorry for the confusion! the STM32H723 is supported: Zephyr supported boards 

    • zephyr/boards/arm/: This directory contains board configuration files for ARM architecture-based boards such as V2M, MPS2, and MPS3, which are ARM Versatile Express boards.

    • zephyr/boards/st/: This directory is specifically for ST boards. The naming convention here is more vendor-specific, focusing on ST's product lines like the Nucleo series, which includes models such as H743ZI and H723ZG.

    "No SOURCES given to Zephyr library: drivers__dac": this could happen if the CMakeLists.txt file for the DAC driver is missing the necessary source files

    Regarding trainings, this is all I can think about: 

    GitHub - zephyrproject-rtos/hal_stm32

    https://docs.zephyrproject.org/latest/ 

    https://discord.com/invite/Ck7jw53nU2 

    You can check PR issues here: https://github.com/zephyrproject-rtos/zephyr/labels/platform%3A%20STM32 

    Use STM32Cube in your application: https://github.com/zephyrproject-rtos/hal_stm32#use-stm32cube-in-your-application

     

    Hope that helps!

    2 replies

    Super User
    June 17, 2024

    Hi,

    >running intro trouble when using Zephyr

    Why ? Using RTOS or not - you just write to the DAC , no "driver" needed.

    When using Cube/HAL , to setup the chip configuration, just use the HAL functions or write direct to DAC .

    ST Employee
    June 20, 2024

    Hello @Lysandros

    You can use STM32H743 as a reference as the Nucleo H723ZG is not yet supported in Zephyr.

    You'll need to create a new board definition under zephyr/boards/arm/, in which you add the board config (board.dts, board_defconfig, Kconfig.board , andCMakeLists.txt) 

    There is already a sample of DAC with STM32H743.overlay here

    This is not a simple task, but it is worth it if you're willing to invest some time learning the whole Zephyr architecture

    LysandrosAuthor
    Graduate II
    June 23, 2024

    Hello @Sarra.S ,

    thanks for your reply and this hyperlink.

    I have a few follow-up questions:

    • I am surprised that "Nucleo H723ZG is not yet supported in Zephyr", because other applications and some samples actually run on this very board with Zephyr. On the other hand, I get: #error "Unsupported board: see README and check /zephyr,user node" when I try to run the dac sample with the H723ZG...
    • the directory zephyr/boards/arm/ contains folders for the V2M, MPS2 and MPS3 boards. However the directory zephyr/boards/st/ actually contains many Nucleo boards including the H743ZI and H723ZG, listing the files you mention (except the CMakeLists.txt). What is the difference between the directories zephyr/boards/arm/ and zephyr/boards/st/ then?
    •  I'm getting the error "No SOURCES given to Zephyr library: drivers__dac". Could it be, that I have to target this driver library somewhere?
    • Can you recommend training courses on Zephyr, in particular for ST boads?

    Best regards

    Lysandros

    Sarra.SAnswer
    ST Employee
    June 25, 2024

    Hello Lysandros, 

    Sorry for the confusion! the STM32H723 is supported: Zephyr supported boards 

    • zephyr/boards/arm/: This directory contains board configuration files for ARM architecture-based boards such as V2M, MPS2, and MPS3, which are ARM Versatile Express boards.

    • zephyr/boards/st/: This directory is specifically for ST boards. The naming convention here is more vendor-specific, focusing on ST's product lines like the Nucleo series, which includes models such as H743ZI and H723ZG.

    "No SOURCES given to Zephyr library: drivers__dac": this could happen if the CMakeLists.txt file for the DAC driver is missing the necessary source files

    Regarding trainings, this is all I can think about: 

    GitHub - zephyrproject-rtos/hal_stm32

    https://docs.zephyrproject.org/latest/ 

    https://discord.com/invite/Ck7jw53nU2 

    You can check PR issues here: https://github.com/zephyrproject-rtos/zephyr/labels/platform%3A%20STM32 

    Use STM32Cube in your application: https://github.com/zephyrproject-rtos/hal_stm32#use-stm32cube-in-your-application

     

    Hope that helps!