Skip to main content
Associate
February 16, 2024
Solved

Stm32H743 spi function question

  • February 16, 2024
  • 2 replies
  • 1620 views

I developed with the stm32f756 chip and then switched to the stm32h743 chip.
Then, the functions "LL_SPI_TX_FIFO_FULL", "LL_SPI_IsActiveFlag_BSY", "LL_SPI_IsActiveFlag_TXE", and "LL_SPI_IsActiveFlag_RXNE" that were in "stm32f7xx_ll_spi.h" cannot be found in "stm32h7xx_ll_spi.h". What is the reason and which function should I use to use those functions in stm32h?

Please share your knowledge. Thank you.

Best answer by FBL

Hello @ToonToon 

H7 HAL driver has different implementation compared to F7. Check AN5293 migration guide, section 11 dedicated for SPI interface showing differences in features, eventually implementation in HAL. For example, on F7, LL_SPI_IsActiveFlag_TXE and RXNE to check if Rx/Tx buffer is not empty. However, on H7, LL_SPI_SR_RXP and LL_SPI_SR_TXP are defined...

2 replies

FBLAnswer
Technical Moderator
February 16, 2024

Hello @ToonToon 

H7 HAL driver has different implementation compared to F7. Check AN5293 migration guide, section 11 dedicated for SPI interface showing differences in features, eventually implementation in HAL. For example, on F7, LL_SPI_IsActiveFlag_TXE and RXNE to check if Rx/Tx buffer is not empty. However, on H7, LL_SPI_SR_RXP and LL_SPI_SR_TXP are defined...

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
ToonToonAuthor
Associate
February 19, 2024

Thank you for answer. It was very helpful. But I can't find a way to replace LL_SPI_IsActiveFlag_BSY. Is there any other function that can replace it?

Andrew Neil
Super User
February 19, 2024

@ToonToon - did you not see the suggestion from @FBL :

 

on H7, LL_SPI_SR_RXP and LL_SPI_SR_TXP are defined...

 

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.
Andrew Neil
Super User
February 16, 2024

It's in the nature of the LL APIs that they are "close" to the hardware - so they shouldn't be expected to be portable.

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.