AnsweredAssumed Answered

HAL_TIM_Base_Start_IT() equivalent in LL for STM32F0?

Question asked by dalewheat on Nov 16, 2017
Latest reply on Nov 16, 2017 by Imen D

I'm trying to learn to use the LL libraries available from CubeMX.  I've had reasonable success using the HAL libraries in the past.  Specifically, I'm trying to get TIM14 to interrupt on a regular basis and blink a pair of LEDs.

Previously, I would configure TIM14 in CubeMX with prescaler and reload values, check the TIM14 global interrupt box, generate the code, then add a call to HAL_TIM_Base_Start_IT(&htim14) to start the timer and begin handling overflow interrupts in HAL_TIM_PeriodElapsedCallback().  This method still works in this new project.

What I would like to do is use the LL libraries for their significantly smaller footprint.  I configure the TIM14 peripheral the same way in CubeMX, but select "LL" instead of "HAL" in the "Project>Settings>Advanced Settings(Driver Selector)" page of CubeMX.

Next I call LL_TIM_EnableCounter(TIM14) to start the counter.  I noted that the MX_TIM14_Init() function already enabled the interrupt before I started the timer.  I then modified the TIM14_IRQHandler() to add a call to my ISR, which I imaginatively named timer14_isr().

TIMER14_IRQHandler() is never called, so my ISR never gets called.  It works fine when I change TIM14 back to HAL.

Specifically, I'm using a STM32F030F4, a cheeep eBay ST-LINK/V2, CubeMX 4.23.0 and Keil MDK524a on Windows 10.

Is there another step, or a completely different approach, to setting up timers with interrupts using CubeMX when using the LL libraries instead of the HAL libraries?

For some reason, when I try to download the CubeMX HAL/LL user manual (UM1785) from "http://www.st.com/content/ccc/resource/technical/document/user_manual/2f/77/25/0f/5c/38/48/80/DM00122015.pdf/files/DM001… " it starts to download, gets about 10% through and then just hangs.  It's been doing this all day.

Is there any other resource I can use to become more familiar with the LL libraries in general?

 

Thank you in advance for any insight.

 

Dale Wheat

Outcomes