cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 nucleo-L053 - systick code

Posted on June 11, 2014 at 22:54

Hi,

I used CubeMX 4.2 to generate code skeleton for L053.

I have no problem with simple programs (LED blinking, etc).

But I cannot use systick. I understand that HAL_init() takes care of setuping the systick.

Unfortunately HAL_GetTick() does not return updated values. It seems that the systick interrupt is not initialized/enabled.

Could you please share working examples for L053?

I have no such issues using Standard  Pheripheral Library on STM32F10x MCUs.

Thanks,

Bogdan
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on June 13, 2014 at 18:15

My fault. I have omitted the ''VECT_TAB_SRAM'' in C/C++->Preprocessor Symbols.

What a shame!

View solution in original post

5 REPLIES 5
Amel NASRI
ST Employee
Posted on June 12, 2014 at 10:39

Hi Bogdan,

You will be contacted soon by our experts if there is any update on the topic.

But please note that CubeMX related issues have to be submitted in the forum ''

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx]STM32 Software Tools and Firmware''. No need to create new thread for this same topic, but this is to apply for new ones, if any :)

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on June 12, 2014 at 18:43

I tested one of the nucleo-L053 examples which uses HAL_Delay().

When the code is loaded via debugger to flash all works fine (the delay is used s I concluded that systick works fine).

When the code is ran out of SRAM (loaded via debugger) it does not work.

 The program stops on HAL_Delay() function (I added some LED blinks before calling the HAL_Delay) so I am sure that it waits for tick update. It seems that tick counter is not updated.

Strange because STM32F100RB works fine (systick works when run out of SRAM).

====

When I manually try to change the VTOC register value in KEIL (it seems to be not updated even though Dbg_RAM.ini is configured) I get:

Internal DLL Error

Internal command error

Could an ST expert run the nucleo-L053 'GPIO_IOToggle' example out of SRAM in Keil IDE?

I mean setting IROM to 0x20000000/0x1000, 0xIRAM to 0x20001000/0x1000

and configuring Dbg_RAM.ini in the debug tab, etc.

Posted on June 12, 2014 at 20:05

Today Keil released new 5.11 version of IDE. This version has updated ST-link drivers for STM32L0.

Unfortunatelly after the update the keil cannot connect to the board (USB errors appears).

It seems that I ran into another issue. The latest ST-link utility has no problem with connecting with the board;)
Posted on June 13, 2014 at 08:14

I wonder if someone managed to run the nucleo-L053 'GPIO_IOToggle' example out of SRAM in Keil IDE? The idea is to try to run the code using systick (or other feature using NVIC/interupts) out of RAM.

I suspect that VTOC is not reconfigured correctly (the NVIC location is not moved to SRAM).

It seems that the latest ST-link utility is able to do this.

So it's rather an issue related to Keil (the latest 5.11 cannot communicate with nucleo at all, the 5.10 can do this to debug a program in the flash but cannot change VTOS - I guess). Again , if the program does not use interrupts the Keil 5.10 is able to place the code in SRAM and run it.

So the issue is very subtle.
Posted on June 13, 2014 at 18:15

My fault. I have omitted the ''VECT_TAB_SRAM'' in C/C++->Preprocessor Symbols.

What a shame!