cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS STM32F2xx port

dimax
Senior
Posted on November 28, 2012 at 16:01

Hi,

I'm trying to run FreeRTOS in my STM32F2xx application built with yagarto.

Does anyone have a working reference project for such case?

Actually I manage to build it but is tuck somewhere in scheduler. 

I'm not sure what peripheral initialization is required for scheduler to work?

#freertos
4 REPLIES 4
Posted on November 28, 2012 at 16:33

I have a port in Keil. As far as initialization CMSIS sets up the HSE/PLL, and then I turn on all the GPIO clocks in prvSetupHardware(), along with the NVIC priority, and SysTick configuration. Other Timers and Interrupts are set up elsewhere.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dimax
Senior
Posted on November 29, 2012 at 20:29

OK.

I've manged to run FreeRTOS in my project.

I had to go over Free RTOS source and look at some STM32F1xx examples.

Bottom line I was missing SysTick configuration and I had to connect 2 interrupt handlers provided by FreeRTOS to SysTick and SVC vectors in startup.s file where vector tables are defined. As one who had written my own OS for AVR I must say that I like the FreeRTOS. It is really a piece of code that worth to look at.

 

dimax
Senior
Posted on November 29, 2012 at 20:29

OK.

I've manged to run FreeRTOS in my project.

I had to go over Free RTOS source and look at some STM32F1xx examples.

Bottom line I was missing SysTick configuration and I had to connect 2 interrupt handlers provided by FreeRTOS to SysTick and SVC vectors in startup.s file where vector tables are defined. As one who had written my own OS for AVR I must say that I like the FreeRTOS. It is really a piece of code that worth to look at.

 

Barry.Richard
Associate III
Posted on December 04, 2012 at 11:56

To answer the original question - FreeRTOS does not itself require any peripheral initialisation. Start by getting a project running that does not use FreeRTOS to ensure your debug configuration, start up file and linker script are ok - then add in the FreeRTOS code and ensure the vector table is populated as per the following links:

http://www.freertos.org/FAQHelp.html

(see FAQ #1 on that page)

http://www.freertos.org/Creating-a-new-FreeRTOS-project.html

http://www.freertos.org/FreeRTOS-quick-start-guide.html

There are lots of examples that show how to create tasks and start the scheduler from that point.