STM32F103RB goes to infinite loop while trying to prvPortStartFirstTask()

athrarvan wrote on Thursday, March 23, 2017:

Dear Community,

I am using STM32F103RB and FreeRTOS v9.0.0. My IDE is SW4STM32 with Ac6 STM32 MCU GCC.
This is my first project with FreeRTOS in which I am trying to turn my LED on in vLEDTask to ensure that everything is correct. I have a problem in vTaskStartScheduler() in which after successful creation of the idle task microcontroller is trying to start first task and occured Default Handler and goes to infinite loop. The question is - what do I do wrong and how to fix it?
I added to the project FreeRTOSConfig.h from CORTEX_STM32F103_Keil demo. I changed configCPU_CLOCK_HZ to 64000000 because it is my cpu clock rate.
This is a link to DropBox with the project and images which are showing my IDE during debugging the vTaskStartScheduler().

Thanks in Advance!

rtel wrote on Thursday, March 23, 2017:

Sounds like you have not installed the FreeRTOS interrupt handlers. See
the “special note to ARM Cortex-M users” under the “The application I
created compiles, but does not run” FAQ on this page:

athrarvan wrote on Friday, March 24, 2017:

Thanks for such a fast reply!
Indeed, I didn’t have these three lines of code:

#define vPortSVCHandler SVC_Handler
#define xPortPendSVHandler PendSV_Handler
#define xPortSysTickHandler SysTick_Handler

Now, everything is running well. Thanks a lot!