cancel
Showing results for 
Search instead for 
Did you mean: 

How to migrate (= convert) old ST drivers to new ones (with HAL)?

AFink
Associate III

Currently, our App uses ST library since 2008.

We'd like to migrate (= convert) old ST drivers to new ones (with HAL).

I found some ST tool (SPL2LL_Converter_V1.0.1), which does some nice job.

Yet, it doesn’t migrate to the HAL drivers, used by CubeMX.

Can you please help me finding the correct and efficient way how to migrate old ST drivers to new ones?

Thanks,

Aviv

5 REPLIES 5
Amel NASRI
ST Employee

Hello Aviv,

Indeed, ithe tool is migrating SPL code to LL (low layer) drivers and not HAL ones.

Both of them are included in the STM32Cube firmware package.

You can also generate code using STM32CubeMX with LL-drivers.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AFink
Associate III

Hi Amel,

What if I do ant to use HAL rather than LL: what's the best way you'd recommend?

Thanks,

Aviv

LL is in some way similar to SPL as it is based on direct access to registers.

However, the HAL (High Abstraction Level) is focusing more on processing.

If you need more details, please review the relevant user manuals of the STM32Cube package your selected.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AFink
Associate III

Hi Amel,

I'm familiar with the difference between LL and HAL.

I chose HAL to be my driver's level.

Can you please recommend of the best way to migrate LL to HAL?

Thanks,

Aviv

> I chose HAL to be my driver's level.

As Amel said above, there's no direct mapping between SPL and Cube/HAL, so your best option is to rewrite your code from scratch for HAL.

JW