2016-01-20 04:50 AM
After spending an entire morning figuring out why my SAI configuration isn't working anymore I guess I found a new bug concerning the configuration of the SLOTR register inside HAL_SAI_Init.
Prior to 1.2.0hsai->Instance->SLOTR|= hsai->SlotInit.FirstBitOffset | hsai->SlotInit.SlotSize
| (hsai->SlotInit.SlotActive <<
16
) | ((hsai->SlotInit.SlotNumber - 1) << 8);
1.2.0
hsai->Instance->SLOTR|= hsai->SlotInit.FirstBitOffset | hsai->SlotInit.SlotSize
| hsai->SlotInit.SlotActive | ((hsai->SlotInit.SlotNumber - 1) << 8);
The missing shift at the SlotActive parameter causes the SLOTEN value to be set to a wrong value. Maybe the shift was left out intentinally but the CubeMX tool still produces the same output for the old and the current library version.
/edit
This was like the 5th bug I reported within 6 months. You guys should put up some kind of reward system for reporting stuff and send me a coffee cup or something. :D
2016-01-20 06:06 AM
Hi Vinci,
Could you precise in which HAL library you have found the issue. So, we can verify it.-Syrine-2016-01-20 08:09 AM
Ah damn it, I knew I'd forgotten something :p
It's concerning the L4-library.2016-01-20 09:00 AM
Hi Vinci,
It is a known bug, and it is already fixed in the STM32CubeL4 version 1.2.0-Syrine-2016-01-21 03:48 AM
You're right I'm sorry!
My bad, I got mixed up between two commits where the library got updated!