Skip to main content
AFink
Associate III
November 6, 2018
Question

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

  • November 6, 2018
  • 4 replies
  • 889 views

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

    This topic has been closed for replies.

    4 replies

    Amel NASRI
    Technical Moderator
    November 6, 2018

    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 "Best Answer" on the reply which solved your issue or answered your question.
    AFink
    AFinkAuthor
    Associate III
    November 6, 2018

    Hi Amel,

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

    Thanks,

    Aviv

    Amel NASRI
    Technical Moderator
    November 6, 2018

    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 "Best Answer" on the reply which solved your issue or answered your question.
    AFink
    AFinkAuthor
    Associate III
    November 7, 2018

    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

    waclawek.jan
    Super User
    November 7, 2018

    > 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