2020-04-15 04:11 PM
STM32F437, STM32CubeIDE Version: 1.3.0
Build: 5720_20200220_1053 (UTC)
OS: Windows 10, v.10.0, x86_64 / win32
Java version: 1.8.0_202
IOC attached.
In CubeMX-generated main.c, the Q register is not set:
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_PLLI2S;
PeriphClkInitStruct.PLLI2S.PLLI2SN = 100;
PeriphClkInitStruct.PLLI2S.PLLI2SR = 3;
PeriphClkInitStruct.PLLI2S.PLLI2SQ = 2; // <<<<< DRN: Add value CubeMX forgot...
ST - please verify you can reproduce this and a bug report filed.
@Amel NASRI (ST Employee), @Camilo LEMOS (ST Employee)
PS: Please note this is a different bug than my prior bug report regarding MCO2:
It looks like that was fixed, but this bug added as a new feature???
2020-04-15 08:07 PM
> prior bug report regarding MCO2
Any link?
JW
2020-04-16 01:09 AM
Hi @Dave Nadler ,
It will be internally checked.
Best regards,
Khouloud
2020-04-18 09:21 AM
@Community member - Link to prior bug report added above, thanks for reminder. I also forgot to add the following...
@Khouloud ZEMMELI - Note that while the code carefully asserts a valid Q and then sets the internal register:
There is no Q register implemented for these parts (this divisor is fixed at 2).
The code is setting reserved/unused register bits.
Bogus code in stm32f4xx_hal_rcc_ex.c below:
/*----------------- In ANY Case of PLLI2S selected -----------------*/
if((PeriphClkInit->PeriphClockSelection & RCC_PERIPHCLK_PLLI2S) == RCC_PERIPHCLK_PLLI2S)
{
/* Check for Parameters */
assert_param(IS_RCC_PLLI2SQ_VALUE(PeriphClkInit->PLLI2S.PLLI2SQ)); // DRN: Q register DOES NOT EXIST on 437
assert_param(IS_RCC_PLLI2SR_VALUE(PeriphClkInit->PLLI2S.PLLI2SR));
/* Configure the PLLI2S multiplication and division factors */
__HAL_RCC_PLLI2S_SAICLK_CONFIG(PeriphClkInit->PLLI2S.PLLI2SN, PeriphClkInit->PLLI2S.PLLI2SQ, PeriphClkInit->PLLI2S.PLLI2SR);
}
2020-04-18 12:31 PM
Dave, thanks for the link... I knew I heard about something similar somewhere somewhen... ;)
I wonder, after so many fights with Cube/CubeMX (yes I've seen your recent post to lwip forum), why do you still use it at all?
Jan
2020-04-22 05:24 AM
Hi @Dave Nadler , Issue confirmed and fixed.
The fix will be available for the next CubeMX release.
Thanks for your feedback
Khouloud
2020-04-22 06:22 AM
@Khouloud ZEMMELI - Can you please confirm fix is:
Do not set non-existent registers in stm32f4xx_hal_rcc_ex.c
Thanks,
Best Regards, Dave