2015-08-19 12:12 PM
It is becoming annoying that since ST's inception of a Cortex implementation there have been Standard Peripheral libraries that simply are not standards to rely on.
I thought that switching to the HAL libraries would eliminate unnecessary changes but, yet again I am proven wrong.This time it is macro names that have changed between libraries.1.2 had....... 1.3 now has.......... __APB1_FORCE_RESET(); __HAL_RCC_APB1_FORCE_RESET(); __GPIOx_CLK_ENABLE(); __HAL_RCC_GPIOx_CLK_ENABLE();.......etc. et ceteraAfter switching from the old 1.2.0 HAL to the new 1.3.0 hoping the update would fix the multitude of UART issues; I find that I now have to go back and change anything that used a macro in my code to add ''__HAL_RCC_'' in front of it. Why? Why were the macro names changed?Who at ST needed something to do that they felt like changing unnecessarily the names on macros?If you are going to standardize a library; correct items within a function \ macro, add new functions or add more macros; STOP changing names of macros!!!!!! #hal #stm32cubemx #cubemx2015-08-20 03:36 AM
Hi NStuff,
1-You don't need to change macro's name by adding ''__HAL_RCC_'', you have only to include the file ''stm32_hal_legacy.h'' in the main.c. 2-Who at ST needed something to do that they felt like changing unnecessarily the names on macros?The reason of this change is to ensure that all series' drivers are compatible, so the user is able to migrate from one serie to another without trouble. -Shahrzad-
2015-08-20 07:16 PM
As long as there is an upwards path; this should work. Is the legacy file documented?
Also, in the past there were migration documents from standard peripheral library x to y. Is there a document for converting from the standard peripheral library to the HAL?2015-08-21 03:11 AM
Hi NStuff,
-Under the Release_Notes file (STM32Cube_FW_F4_V1.7.0\Drivers\STM32F4xx_HAL_Driver), there is a note concerning the addition ofstm32_hal_legacy.h.
Concerning F0 package, it is not mentioned. We apologize for any inconvenience caused and an enhancement has been reported.
-Also thers is no document related to the migration from Standard Peripheral Library to HAL drivers. -Shahrzad-As long as there is an upwards path; this should work. Is the legacy file documented?
Also, in the past there were migration documents from standard peripheral library x to y. Is there a document for converting from the standard peripheral library to the HAL?