cancel
Showing results for 
Search instead for 
Did you mean: 

Initialzation for STM32F207 with CMSIS RTX

vinayakrjoshi
Associate II
Posted on May 20, 2015 at 13:35

HI,

I want to make a baseline code for STM32F207 with CMSIS RTX. I gone through the example code 

*

 * main: initialize and start the system

 */

int main (void) {

  osKernelInitialize ();                    // initialize CMSIS-RTOS

  // initialize peripherals here

  // create 'thread' functions that start executing,

  // example: tid_name = osThreadCreate (osThread(name), NULL);

osKernelStart ();                         // start thread execution 

}

But I want to initialize the peripherals before  osKernelInitialize(). will it be OK?

Also i want to initialize the Interrupt and i read below one of CMSIS document,

NVIC Priority Group Settings

The initialization of CMSIS-RTOS RTX reads out the NVIC Priority Group configuration and sets the system handlers to the correct priority. If custom settings of groups are made after the startup code executes, the system may be miconfigured.

Make sure that you set the PendSV to the lowest level available after configuration of your custom interrupt priorities and groupings.

NVIC_SetPriority(PendSV_IRQn, <new priority>);

Where should i write it?

pl. help.
0 REPLIES 0