2024-09-21 01:56 PM
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.
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
Solved! Go to Solution.
2024-09-21 11:44 PM
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 ?
2024-09-21 02:40 PM
HI,
i always use tim6 ....try.
2024-09-21 02:56 PM
Hi,
On F103C8T6 only Timers 1, 2, 3 and 4 are available.
Akos
2024-09-21 11:44 PM
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 ?
2024-09-22 12:05 AM
Hi,
Thanks for your reply! Boot0 was not at ground. I switched the jumpers around and now I can initialize SysTick and FreeRTOS as well. I verified that RTOS is working with a simple task that transmits an UART packet periodically.
What does Boot0 do?
Akos
2024-09-22 05:02 AM
One clock (or so) after reset end -> hi , the state of boot0 is checked : if hi -> bootloader is started, if lo -> program is started in flash (or ram, depends on boot1 state).
The jump to 0xFFFFFF... is indication for : jump to bootloader or watchdog ...
See AN2606 about boot modes.