2022-02-14 01:45 AM
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.
Solved! Go to Solution.
2022-02-15 01:11 AM
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.
2022-02-14 05:02 AM
It's only defined if SPI_CR2_FRF is defined, which for the STM32L151XB, it is not.
There are many "STM32L151" chips, I didn't check them all. Perhaps be more precise.
2022-02-14 05:15 AM
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
2022-02-14 05:17 AM
Yes, sounds like a CubeMX generation bug.
2022-02-14 05:31 AM
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.
2022-02-15 01:11 AM
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.
2022-03-07 11:13 PM