2017-08-21 04:23 AM
Hi!! Project(STM32F4) is written using the STD library, but in HAL libary much easier to work with ethernet. How do you think it is possible to use HAL and STD library together?
#stm32f4 #std_lib #hal2017-08-21 05:23 AM
Hello Paul,
In order to have a consistent project it would be much better to use one approach. Maybe you can consider porting Standard Peripheral Library code to HAL code. Recently we introduced a tool, which makes such conversion automatically. It is called
http://www.st.com/en/development-tools/spl2ll-converter.html
. This tool converts SPL code to HAL LL code (because SPL is much more similar to HAL LL comparing to standard HAL).Regards
Szymon
2017-08-21 07:48 AM
Hello Szymon,
I too am possibly interested in the converter; but just as the OP has specified STM32F4, we have a large SPL code base used with STM32F4. From the page you linked to:
It ensures full migration within a given STM32 series and partial migration across STM32 series. The migration is possible only for STM32 peripherals covered by STM32Cube LL drivers.I have asked in other threads how much is STM32F4 supported in LL drivers (or will be), as it doesn't appear like there is much. My question has never been answered by ST. Is there a document that details what support there will be in terms of LL for STM32F4? This is the primary reason we have resisted making the move to STM32CubeMX and HAL.
Thanks,
Darrell
2017-08-21 11:21 AM
Hello Darrell,
I have just checked the STM32F4Cube package, latest revision (1.16). HAL LL supports these peripherals:
ADC, CRC, DAC, DMA, DMA2D, EXTI, FMC, FSMC, GPIO, I2C, LPTIM, PWR, RCC, RNG, RTC, SDMMC, SPI, TIM, USART, USB.
I agree that these are not all peipherals, which we can find across all MCUs in STM32F4 family, but at least most of the standard peripherals seems to be covered by LL.
Regarding your question concernign STM32F4 support for LL - within two next months new release of CubeMX is expected - version 4.23. It will allow to generate code for STM32F4 based on HAL LL. Now this tool allows doing it for some STM32 families (like L0, F0, L4), but not yet for F4. So this feature will be added.
Regards
Szymon2017-08-21 12:33 PM
Szymon,
Thanks for the reply.
HAL LL supports these peripherals:
ADC, CRC, DAC, DMA, DMA2D, EXTI, FMC, FSMC, GPIO, I2C, LPTIM, PWR, RCC, RNG, RTC, SDMMC, SPI, TIM, USART, USB.
I agree that these are not all peipherals, which we can find across all MCUs in STM32F4 family, but at least most of the standard peripherals seems to be covered by LL.
In the version of STM32CubeMX that I have currently installed (Help-About says Version 4.19.0 , but it also says STM32Cube V1.0), the only peripheral source files that say LL are for FMC, FSMC, SDMMC and USB (for STM32F4). All the other source files are labeled as HAL.
I'm a little confused. First, is the converter LL only or does it cover HAL? Are the above listed peripherals covered by LL or HAL only? Are they covered by the converter?
Sorry if I am appearing dense on this. Does anyone else share my confusion?
Thanks again,
Darrell