cancel
Showing results for 
Search instead for 
Did you mean: 

Question about mixing HAL and LL library for UART

jeffz
Associate II

Hi,

I try to use both HAL and LL library for UART. When I config UART with cubeMX for LL library, I found all functions with HAL library in my code doesn't work. when I say it doesn't work, I mean the code passed compiling but doesn't do anything. Then I have to config UART for HAL library with cubeMX and add LL library manually to make it working. This is same as the ST example code.

Now my question is,

Why compiler doesn't show errors when I call HAL library but UART configured with LL library in cubeMX? And why there are no HardFault exception when code is running?

What is the best practice to use mixed HAL and LL library? It looks like it only works if I configure UART with HAL library in CubeMX and manually add LL library. Can CubeMX do this kind job correctly?

Thanks,

0 REPLIES 0