Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


STM32F103 Ride7 demo FreeRTOS - Hard Fault

Posted by Thomas Jespersen on January 22, 2012
Hi everybody.
I am new to FreeRTOS and have been looking hard on the internet to find a simple example with some LEDs blinking using the tasking feature in FreeRTOS, but I haven't been able to find it.
So I started ripping off everything unnecessary from the CORTEX_STM32F103_GCC_Rowley demo, though I would actually like to use Ride7!
After much struggling I finally managed to compile with the standard Startup and Script file - I don't know if I should make any changes?

But of course it didn't work. As I have read on different posts the problem seems to lie in the StdPeriph and CMSIS. Though I am using version 3.5.0 of StdPeriph which includes version 3.1.0 of the CMSIS. Is this supposed to work or not?
After some debugging I have managed to not getting it into Hard Fault but instead it stops at executing the assembler lines in the vPortStartFirstTask routine.

I would like to know if any of you have a Blink example for the new/most recent version of the StdPeriph - or something around that version?

Thank you

Best Regards
Thomas Jespersen

RE: STM32F103 Ride7 demo FreeRTOS - Hard Fault

Posted by Richard on January 22, 2012
There is a RIDE project in FreeRTOS - although it is very old:

With ST you have to ensure the interrupt priority bits are all set to preemption priority, rather than sub priority, to make your life easier. ST seem to stand out from the crowd by not doing that by default. Using the ST library, it is normally done using

NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 );

If their drivers use something else internally then it will make life hardware for sure.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner