Split: SysTick doesn't increment in STM32 CubeMX samples when executed from SRAM

Sysprogs forums Forums VisualGDB Split: SysTick doesn't increment in STM32 CubeMX samples when executed from SRAM

This topic contains 1 reply, has 2 voices, and was last updated by  support 1 week, 2 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24257

    KalaCanel
    Participant

    Hi…<span class=”uiOutputText” dir=”ltr”>I’m using STM32CubeMX to generate code for a custom STM32L051R8T6 project.  SysTick functions as expected when HAL drivers are selected.  SysTick does not work if LL drivers are selected.  Is there a reason why STM32CubeMX generated SysTick code only works when HAL drivers are selected for ‘RCC’?</span>

    #24264

    support
    Keymaster

    Hi,

    It is hard to pinpoint the exact reason for the code that was generated by the external tool, however we can provide you with instructions for troubleshooting this.

    Please try creating a regular “LEDBlink” project with the VisualGDB project wizard, set a breakpoint in HAL_IncTick() and run the program so that it hits. Then check the call stack.

    You should normally see the following stack:

    1. HAL_IncTick() itself
    2. The interrupt handler that calls HAL_IntTick().

    Running the “find all references” command on the handler should show that it’s referenced from the interrupt vector table (typically called g_pfnVectors). In turn, checking the map file for g_pfnVectors should show that it’s placed exactly at the beginning of the FLASH memory (where the CPU would expect the interrupt handler table to be).

    Once you can confirm it, please follow those steps backwards for the LL project (i.e. interrupt vector table -> specific interrupt handler -> call to HAL_IncTick()). If the system ticks are not working, one of those components is likely missing. If you are not sure, please let us know your findings and we will help you find a way to restore it.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.