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.