cancel
Showing results for 
Search instead for 
Did you mean: 

LL Driver Support for SPI on STM32H743ZI

mohitha
Associate II

I am working on a project using the STM32H743ZI microcontroller.
I want to implement SPI communication using the LL (Low-Layer) drivers instead of HAL.

:question_mark: Can you confirm whether the STM32H743ZI supports LL SPI driver APIs like LL_SPI_Init, LL_SPI_TransmitData8, etc.?

Also, are there any specific settings or header files (like USE_FULL_LL_DRIVER) required to enable these LL functions in STM32CubeIDE

Does STM32H743ZI support SPI communication using LL drivers? I’m using STM32CubeIDE.
SPI1 is enabled, but LL_SPI functions are disabled unless I define USE_FULL_LL_DRIVER.
Is this the correct way to enable LL SPI support?

10 REPLIES 10
KnarfB
Super User

How was the project code generated? By STM32CubeMX (.ioc file)?

 

I am using stm32h747bit6-DISO board in stm32cubeide 1.18.1 software 

You can switch between HAL and LL drivers (when available) in the Project Manager TAB (Advanced Settings).

This should enable USE_FULL_LL_DRIVER automatically.

Andrew Neil
Super User

@mohitha wrote:

Can you confirm whether the STM32H743ZI supports LL SPI driver APIs like LL_SPI_Init, LL_SPI_TransmitData8, etc.?


You have that question the wrong way around!

The STM32H743ZI neither knows nor cares what you use in your source code - all it sees are the binary instructions in its Flash.

The question, then, is whether the Firmware Pack provides these LL APIs.

 

You can find this on the 'Tools & Software' tab of the STM32H743ZI  Product Page:

https://www.st.com/en/microcontrollers-microprocessors/stm32h743zi.html#tools-software

This links you to the STM32CubeH7 firmware package - see the 'Documentation' tab for documentation:

https://www.st.com/en/embedded-software/stm32cubeh7.html#documentation

 

The document you require is UM2217Description of STM32H7 HAL and low-layer drivers:

AndrewNeil_0-1750751839940.png

 

https://www.st.com/resource/en/user_manual/um2217-description-of-stm32h7-hal-and-lowlayer-drivers-stmicroelectronics.pdf#page=3561 

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Imen.D
ST Employee

Hello @mohitha ,

First let me welcome you to the STM32 Community.
Please don't repost the same question several times and ensure the continuity of this issue in this thread (Duplicate threads will be deleted).

If you still have issues, don't hesitate to come-back to the Community either as a continuity of this one (when it's related to same initial topic) or with new threads (when it's a new problem).

 

- The STM32H743ZI microcontroller supports SPI communication using LL drivers (which are part of the STM32Cube firmware package, this includes functions like LL_SPI_Init, LL_SPI_TransmitData8, and others)

- STM32H743ZI device is already supported in the STM32CubeH7 for HAL and LL drivers.
You can refer to the working application applicable for STM32H743ZI and available in this link:
https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/

- To enable LL SPI functions in STM32CubeIDE, you need to define the USE_FULL_LL_DRIVER macro. This directive ensures that the LL driver functionalities, including SPI-related functions, are included in your project. Without this definition, certain LL functions may not be available, leading to compilation errors.

- You can also use STM32CubeMx tool and ensure that the desired SPI peripheral is properly configured in STM32CubeMX before generating the code. Verify that the LL drivers are enabled in the STM32CubeMX configuration (Project Manager > Advanced Settings).

ImenD_0-1750832012515.png

For that, you can refer to these sections: "4.11.3 Advanced Settings tab" and "6.2 STM32Cube code generation using Low Layer drivers", in the UM1718: STM32CubeMX for STM32 configuration and initialization C code generation - User manual

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

@Imen.D wrote:

The STM32H743ZI microcontroller supports SPI communication using LL drivers


Again, to be pedantic, that's backwards:

The STM32H743ZI microcontroller itself neither knows nor cares what drivers - if any - the source code uses.

The "support" is not in the microcontroller - it's in the drivers.

The LL Drivers do provide functions like LL_SPI_Init, LL_SPI_TransmitData8, and others.

The LL Drivers are part of the STM32Cube firmware package, and can be enabled in the source code via CubeMX.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
mohitha
Associate II

sorry, I am typing  wrong MCU part number .

I am working on a project using the STM32H747BIT6-DISCO microcontroller.

I want to implement SPI communication using the LL (Low-Layer) drivers instead of HAL.
:question_mark: Can you confirm whether the STM32H747BIT6-DISCO supports LL SPI driver APIs like LL_SPI_Init, LL_SPI_TransmitData8, etc.?
Also, are there any specific settings or header files (like USE_FULL_LL_DRIVER) required to enable these LL functions in STM32CubeIDE 1.18.1 Does STM32H747BIT6-DISCO support SPI communication using LL drivers? I’m using STM32CubeIDE.SPI1 is enabled, but LL_SPI functions are disabled unless I define USE_FULL_LL_DRIVERIs this the correct way to enable LL SPI support?

@Andrew Neil You are right. Thanks for clarify the wording.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi @mohitha ,

There is a typo in the following sentence in "6.2 STM32Cube code generation using Low Layer drivers" section of UM1718:

"For all STM32 series except STM32H7 and STM32P1, STM32CubeMX allows the user to
generate peripheral initialization code based either on the peripheral HAL driver or on the
peripheral Low Layer (LL) driver."

The limitation for STM32H7 and STM32MP1 does not exist, the doc will be updated in the coming releases to remove "except STM32H7 and STM32P1".

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen