Skip to main content
Associate III
August 26, 2024
Solved

"LL_SPI_SetRxFIFOThreshold() was not declared in this scope"

  • August 26, 2024
  • 1 reply
  • 1202 views

Hello everyone,

I want to add a process called LL_SPI_SetRxFIFOThreshold(SPI3, LL_SPI_RX_FIFO_TH_QUARTER) in my program to set the FRXTH bit, but LL_SPI_SetRxFIFOThreshold was not declared in this scope.”
How can I deal with this error?

 

microcontroller stm32f407vgt6, cubeIDE

Required header file #include “stm32f4xx_ll_spi.h” is written

 

void SPI3_Start(void)

{
 LL_SPI_Enable(spi2);
 LL_SPI_SetRxFIFOThreshold(spi2, LL_SPI_RX_FIFO_TH_QUARTER);
}

 

Can you help me with this issue?

Thank you

 

Best answer by STTwo-32

Sure no since the bit configured by such a function is not available on the STM32F407 SPI_CR2 register.

Best Regards.

STTwo-32

1 reply

STTwo-32
Technical Moderator
August 26, 2024

Hello @baby_chicken 

the LL_SPI_SetRxFIFOThreshold() is reserved to Set threshold of RXFIFO that triggers an RXNE event. In other world, it set the FIFO reception threshold bit of the CR2. But this bit is not available on the STM32F407 MCUs. So, you can't use the LL_SPI_SetRxFIFOThreshold() function. This function is available for the STM332F7 Series for examples.

Best Regards.

STTwo-32

Associate III
August 26, 2024

Thank you for your answer, @STTwo-32 

 

Is there any kind of alternative to the LL_SPI_SetRxFIFOThreshold() function that can be used with the STM32F407?
Thanks in advance.

 

 

STTwo-32
STTwo-32Best answer
Technical Moderator
August 26, 2024

Sure no since the bit configured by such a function is not available on the STM32F407 SPI_CR2 register.

Best Regards.

STTwo-32