2017-04-03 09:07 AM
Hey,
I just updated my version of STM32CubeMX to 4.20 and now when I generate a project for the STM32F401VCTX using only the RCC-> HSE (A crystal not the internal clock) it gets stuck in SystemClock_Cofig(void). I was able to find that the issue was because for some reason the new cubeMX now uses:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;
instead of:
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
even though only the HSE clock is used. For this reason it gets stuck in the Error Handler. This problem was not there in the previous versions of cube. Please look into this and fix this issue.
Thank you
#stmcubemx-4.20 #hse #rcc #hsiSolved! Go to Solution.
2017-04-28 12:19 AM
Hello
Foto.Yonathan
,I would inform you that anew patch
V 4.1is available to fix this issue.Sorry for any inconvenience this may cause you.
BR. Eric
2017-04-03 09:21 AM
Hi
Foto.Yonathan
,This is a known bug in the CubeMx V4.20 and will be fixed soon in the new patch releases.
Sorry for the inconvenience it may bring.
Thanks
Imen
2017-04-03 10:15 AM
Great!
I would also suggest creating a GPIO_Pin Class containing the GPIO PIN and PORT Number for all GPIO initalized on STM32CubeMX and modifying the HAL_GPIO.c functions so that they can be used by only calling the pin name for example:
OLD PIN Read: HAL_GPIO_ReadPin(
Button_Enter_GPIO_Port
,Button_Enter
_PIN);NEW PIN Read:
HAL_GPIO_ReadPin(Button_Enter
);
And if you could add separate functions for setting a pin high or low that would be excellent. For Example:
OLD WRITE PIN HIGH: HAL_GPIO_WritePin(LED0_GPIO_Port,LED0_Pin,GPIO_PIN_SET);
NEW WRITE PIN HIGH: HAL_GPIO_SetPin(LED0);
OLD WRITE PIN LOW: HAL_GPIO_WritePin(LED0_GPIO_Port,LED0_Pin,GPIO_PIN_RESET);
NEW WRITE PIN LOQ: HAL_GPIO_ClearPin(LED0);
These changes would make programming simple things like turning on and off pins easier.
I have all these functions in a library but if it was automatically done in STM32CubeMX and i didnt need to link my library for every project that would be great!!
Thanks for the help
2017-04-04 03:35 AM
Hi,
Thank you
Foto.Yonathan
for your suggestion.I will raise your request internally for further investigation.
Thanks
Imen
2017-04-28 12:19 AM
Hello
Foto.Yonathan
,I would inform you that anew patch
V 4.1is available to fix this issue.Sorry for any inconvenience this may cause you.
BR. Eric