Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training



Posted by Jim Wall on June 13, 2011
I just ported FreeRTOS 7 to the STM32L-DISCOVERY board using Atollic TRUESTUDIO Lite. Considering that this was my first port, it was relatively straight forward with the with one exception. I created a new C project and just added the FreeRTOS directory. Once the proper includes and sources directories were linked, the project built clean. I had to modify startup_stm32l1xx_md.s to include xportSVCHandler, xPortPendSVCHandler, and xPortSysTickHandler.

At this point FreeRTOS was running but very slowly. The vTaskDelay function was off by an order of magnitude. After a lot of fiddling around, I discovered that the SysSysClock function was failing to properly configure the system clock. It turns out that the system_stm32l1xx.c file that Atollic uses for the STM32L-DISCOVERY is not correct. The file tries to configure HSE but the STM32L-DISCOVERY board does not have the external oscillator installed. I just grabbed the system_stm32l1xx.c file from the STM demo project. It worked like a charm.

I hope this might help others who try porting to the STM32L-DISCOVERY. Now I just have to port all the cool features of the demo app to be thread safe under FreeRTOS.


Posted by Richard on June 13, 2011
Second attempt at posting - as the first seemed to disappear.

FreeRTOS contains an official demo for the discovery board that uses the Atollic tools. The documentation page is here:

I do not recall having any difficulties with the clock speed, but have pinged Atollilc support just in case.



Posted by Jim Wall on June 13, 2011
This clock problem is on the STM32L-DISCOVERY not the STM32VL-DISCOVERY pointed to by your link. The STM32L has a small LCD and touch Sensor on board. The problem is that it lacks an external oscillator for the STM32L152RBT chip, therefore it must be configured to use HSI rather than HSE.

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

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists