Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


SPI on Nucleo_STMH533RE

Hello, I am unfortunately a beginner in terms of Zephyr, installation compiling works, all no problem, but now I just wanted to configure the SPI as master. Here I break my neck.

I have already looked at many examples, but either the device tree can no longer be compiled or the SPI ends with an error.

Does anyone have a tip for me? Surely a piece of cake for an experienced user?

How do I create a devicetree where I can configure the pins for CS, MOSI, MISO and Clock?

Hi, you should first familiarize yourself with the devicetree concept and the Kconfig configuration system in Zephyr.
I recommend this video to understand how they work: Configure Zephyr: Kconfigs and Devicetree in Simple WordsQuestion
For configuring SPI and other peripherals, start by reviewing the Zephyr SPI documentationQuestion, then explore existing examples.
For your specific board, check the generated build/primary/zephyr/zephyr.dts file to see the current configuration. In your application, create an overlay file (e.g., app.overlay) to reconfigure settings.
For example (theoretical):
&spi1 {
pinctrl-0 = < &spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
pinctrl-names = “default”;
cs-gpios = < &gpiob 0 GPIO_ACTIVE_LOW>;
status = “okay”;
};
For more details, check existing Zephyr samplesQuestion


I have just seen your reply, did you manage to find a way to set it up ? the error you are getting means that you need to give pinmux property in the pins you are setting to pinctrl-0, because it is set as required in the bindingQuestion you also have an example in this file
You need to set it up like this for example:

 
pinmux = < STM32_PINMUX('F', 7, ANALOG) >, /* SPI5_SCK */
          < STM32_PINMUX('F', 8, ANALOG) >, /* SPI5_MISO */
         < STM32_PINMUX('F', 9, ANALOG) >, /* SPI5_MOSI */
         < STM32_PINMUX('F', 6, ANALOG) >; /* SPI5_NSS */

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs