Skip to main content
Visitor II
May 21, 2021
Question

Can we combine hal based project with register level project

  • May 21, 2021
  • 1 reply
  • 1007 views

Hi, everyone

I have 2 project in one of the project i have used hal library for stm32f1 while in the other project i have use register access i.e all the peripheral like uart, adc are accessed at register level ​like in stm8 pls suggest is it possible to merge these 2 project

    This topic has been closed for replies.

    1 reply

    Super User
    May 21, 2021

    There are no issues in general combining HAL and register level access, but generally you should only use HAL or register level access for a particular peripheral. The only problem comes from using both for the same peripheral without understanding how HAL operates and how accessing registers affects it.

    ABhat.7Author
    Visitor II
    May 22, 2021

    Hi ,@[TDK]​

    Thank for reply but can you provide any examples or links through which i can get reference that how to merge them ​

    Super User
    May 22, 2021
    Not sure what you're looking for. Copy the relevant code from one project to the other and adjust programming logic according to how you want them to be used. If they don't interact with one another, it should be a straightforward task.