Skip to main content
Explorer
September 21, 2024
Solved

STM32F103C8 SysTick initialisation issue

  • September 21, 2024
  • 1 reply
  • 1478 views

Hi,

I am using STM32F103C8T6 Blue pill board, STM32 CubeIDE 1.16.0, Build: 21983_20240628_1741 (UTC) on Ubuntu 22.04.5 LTS and ST Link v2 debugger. I am able to upload code, execute it and debug it via SWD.

I am using CubeIDE's Pinout & configuration utility to configure peripherals and software modules. I want to add FreeRTOS to an empty project. Due to issue 189410 I have to revert Firmware package version to 1.8.5. If I select Firmware package version 1.8.5, I can enable FreeRTOS with CMSIS_V2 interface and generate and compile code successfully. For FreeRTOS to work, I enable USE_NEWLIB_REENTRANT in FreeRTOS advanced configuration tab, and also select a timer as Timebase source in SYS module. I tried selecting TIM1, 2, 3, 4 - all of them produce the same result. In RCC module I selected Crystal/Ceramic Resonator as HSE, in Clock Configuration I used default 8MHz as HCLK.

If I try to run the generated code, execution halts in __NVIC_EnableIRQ() when SysTick Timer interrupt gets enabled. I attached call stack below.

akosbalogh01_0-1726951418169.png

I run into the same issue even without FreeRTOS, if I select any timer as Timebase source in SYS module.

Am I missing something in my RTOS or peripheral configuration? Could it be a hardware issue? I don't have another F103 at hand to test it with another MCU, so I can't rule it out.

Best regards,

Akos

 

    This topic has been closed for replies.
    Best answer by AScha.3

    Hi,

    your right. 

    Anyway - you get a strange call 0xfffffff9 ->

    1. boot0 at gnd ?

    2. both watchdogs disabled , not active ?

    3. nrst and nmi hi ?

    1 reply

    Super User
    September 21, 2024

    HI,

    i always use tim6 ....try.

    Explorer
    September 21, 2024

    Hi,

    On F103C8T6 only Timers 1, 2, 3 and 4 are available.

    Akos

    AScha.3Answer
    Super User
    September 22, 2024

    Hi,

    your right. 

    Anyway - you get a strange call 0xfffffff9 ->

    1. boot0 at gnd ?

    2. both watchdogs disabled , not active ?

    3. nrst and nmi hi ?