cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_TIM_Base_Start_IT() equivalent in LL for STM32F0?

dale
Associate III
Posted on November 16, 2017 at 04:03

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/DM00122015.pdf/jcr:content/translations/en.DM00122015.pdf

 ' 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

1 REPLY 1
Imen.D
ST Employee
Posted on November 16, 2017 at 15:18

Hello,

Please shareyour code related to the

TIMER14_IRQHandler function.

Here is attached the needed UM1785Description of STM32F0 HAL and low-layer drivers and y

ou may refer to the TIM_TIMBase example which can help you on your application :STM32Cube_FW_F0_V1.9.0\Projects\STM32F030R8-Nucleo\Examples\TIM\TIM_TimeBase

Best Regards

Imen

________________

Attachments :

UM1785.pdf : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyHw&d=%2Fa%2F0X0000000b5g%2Fe9ua1Zhkhc6s1foJlpVxXky8N6EHo9vrzVQf6zX_1Qs&asPdf=false
When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen