cancel
Showing results for 
Search instead for 
Did you mean: 

LL_SPI_SetStandard created for STM32L151 although Firmware does not support this call.

stst9180
Associate III

Hi Folks, Currently Stm32CubeMx Generator for STM32L151 creates an "LL_SPI_SetStandard" call in spi.c which is not available for that device. That seems to be a bug here.

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @stst9180​  , @TDK​ 

Thanks for your feedback,

You are right, This is a CubeMX code generation bug, The LL_SPI_SetStandard is not supported for category 1 or category 2 STM32L1 devices as SPI_CR2_FRF bit is not defined for these devices.

The SPI_CR2_FRF bit, which represents the SPI TI mode, is only available in the category 3, category 4, category 5 and category 6 devices and not whole STM32L1 devices. 

The devices categories are described in the "section 1.5 Product category definition" of the RM0038 reference manual.

This issue was already detected and raised to the dev team to be fixed. I'll keep you posted with the updates.

Internal ticket number: 122799 (This is an internal tracking number and is not accessible or usable by customers).

Thanks @Amel NASRI​ ​ for flagging this to us.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

View solution in original post

6 REPLIES 6
TDK
Guru

It's only defined if SPI_CR2_FRF is defined, which for the STM32L151XB, it is not.

https://github.com/STMicroelectronics/STM32CubeL1/blob/master/Drivers/STM32L1xx_HAL_Driver/Inc/stm32l1xx_ll_spi.h#L359

https://github.com/STMicroelectronics/STM32CubeL1/blob/master/Drivers/CMSIS/Device/ST/STM32L1xx/Include/stm32l151xb.h

There are many "STM32L151" chips, I didn't check them all. Perhaps be more precise.

If you feel a post has answered your question, please click "Accept as Solution".
stst9180
Associate III

Sorry. I'm talking about STM32L151RBTxA.

So in the header it's not defined, you're right.

Unfortunately the CubeMX initializationcode generator still produces the call to that function in the LL initialization code.

Regards

Pascal

Yes, sounds like a CubeMX generation bug.

If you feel a post has answered your question, please click "Accept as Solution".

Hi @stst9180​ & @TDK​ ,

Thanks for reporting & investigating the issue.

@Sara BEN HADJ YAHYA​  could you please have a look?

-Amel

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.

Sara BEN HADJ YAHYA
ST Employee

Hello @stst9180​  , @TDK​ 

Thanks for your feedback,

You are right, This is a CubeMX code generation bug, The LL_SPI_SetStandard is not supported for category 1 or category 2 STM32L1 devices as SPI_CR2_FRF bit is not defined for these devices.

The SPI_CR2_FRF bit, which represents the SPI TI mode, is only available in the category 3, category 4, category 5 and category 6 devices and not whole STM32L1 devices. 

The devices categories are described in the "section 1.5 Product category definition" of the RM0038 reference manual.

This issue was already detected and raised to the dev team to be fixed. I'll keep you posted with the updates.

Internal ticket number: 122799 (This is an internal tracking number and is not accessible or usable by customers).

Thanks @Amel NASRI​ ​ for flagging this to us.

If your issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Sara.

Sara BEN HADJ YAHYA
ST Employee

Hello @stst9180 ​,

This issue is fixed in STM32CubeMX latest release.

V6.5.0 is now available under this Link.

Thanks for your contribution.

Sara.