/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / How can I get the best STM32 performances?

Username:     
Password:     
             

Forum

# 1   2008-10-15 16:54:07 How can I get the best STM32 performances?

jrnore
New member
Registered: 2008-10-15
Posts: 5

How can I get the best STM32 performances?

Hi,

I bought a STM32 Primer kit and would like to bench it, in order to know how faster is the Cortex M3.
I have installed Ride7 and have ported dhrystone2. I am using the SysTick functions to measure the elapsed time and have initialized the application by:

  /* System Clocks Configuration */
  RCC_Configuration();

  /* NVIC Configuration */
  NVIC_Configuration();

  /* Enable GPIOB clock */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);

  /* Configure PC.06, PC.07, PC.08 and PC.09 as output push-pull */
  GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_8 | GPIO_Pin_9;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOB, &GPIO_InitStructure);

  SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
  SysTick_SetReload(0xFFFFFF);
  SysTick_CounterCmd(SysTick_Counter_Enable);
  SysTick_GetCounter();



Compiled with -O3, I just get a poor score of 0.7 DMips/MHz. Is there anything to do to speed up the processor? The CM3 should be at 1.25DMIPS/MHz.

-
Frank

Offline

 

# 2   2008-10-16 15:38:55 How can I get the best STM32 performances?

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: How can I get the best STM32 performances?

It depends of what you put in RCC_Configuration... (you need to configure in order to select 72MHz for the core clock).

Offline

 

# 3   2008-10-16 15:59:27 How can I get the best STM32 performances?

jrnore
New member
Registered: 2008-10-15
Posts: 5

Re: How can I get the best STM32 performances?

Hi Francis,

Thanks for the reply.

Here is my RCC_Configuration:
void RCC_Configuration(void)
{
  /* RCC system reset(for debug purpose) */
  RCC_DeInit();

  /* Enable HSE */
  RCC_HSEConfig(RCC_HSE_ON);

  /* Wait till HSE is ready */
  while(RCC_GetFlagStatus(RCC_FLAG_HSERDY) == RESET)
  {
  }

  /* HCLK = SYSCLK */
  RCC_HCLKConfig(RCC_SYSCLK_Div1);
 
  /* PCLK2 = HCLK */
  RCC_PCLK2Config(RCC_HCLK_Div1);

  /* PCLK1 = HCLK */
  RCC_PCLK1Config(RCC_HCLK_Div1);

  /* Select HSE as system clock source */
  RCC_SYSCLKConfig(RCC_SYSCLKSource_HSE);

  /* Wait till HSE is used as system clock source */
  while(RCC_GetSYSCLKSource() != 0x04)
  {
  }
}

I am using the 12MHz clock and did not set wait states to the flash (I assume that there are 0 WS by default). I would like to bench without wait-state, anyway, in order to check that I can achieve 1.25DMips / MHz, as described in the datasheet.
Is there any wrong things in my configuration?

Regards,
Frank

Offline

 

# 4   2008-10-17 07:24:21 How can I get the best STM32 performances?

khauer
Member
Registered: 2008-10-07
Posts: 17

Re: How can I get the best STM32 performances?

Hi Frank,

I have some questions to your benchmarking.

1. Which IDE did you use?

2. Did you measure the time wiht a scope?

3. Is it possible to post your entire code? I would like to compare it with mine.

Thanks and regards

Last edited by khauer (2008-10-17 08:22:38)

Offline

 

# 5   2008-10-17 10:48:19 How can I get the best STM32 performances?

jrnore
New member
Registered: 2008-10-15
Posts: 5

Re: How can I get the best STM32 performances?

Hi,

I am using Ride7 IDE v7.01.0002 and RKitARM for RIDE7 v1.03.0003.
I am using the sysTick and the measure time is short enough so that there is no underflow on the 24-bit timer.
I will make a zip of the package when I will have time.

Regards,
Frank

Offline

 

# 6   2008-10-17 11:33:21 How can I get the best STM32 performances?

khauer
Member
Registered: 2008-10-07
Posts: 17

Re: How can I get the best STM32 performances?

Thanks.

I need only the main.c.....


Regards klaus

Offline

 

# 7   2008-10-17 16:05:35 How can I get the best STM32 performances?

jrnore
New member
Registered: 2008-10-15
Posts: 5

Re: How can I get the best STM32 performances?

More news: I have checked with a scope, and the measured time perfectly matches the time measured by the SysTick.
So, I am pretty confident that I am using 12MHz and that my measure function works.

Here is the main.c:
(BTW, is it possible to attach files on the forum?)

/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
* File Name          : main.c
* Author             : MCD Application Team
* Date First Issued  : 02/05/2007
* Description        : Main program body
********************************************************************************
* History:
* 04/02/2007: V0.2
* 02/05/2007: V0.1
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/

/* Includes ------------------------------------------------------------------*/
#define _SysTick
#include "stm32f10x_lib.h"

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
GPIO_InitTypeDef GPIO_InitStructure;

/* Private function prototypes -----------------------------------------------*/
void RCC_Configuration(void);
void NVIC_Configuration(void);
void Delay(vu32 nCount);

/* Private functions ---------------------------------------------------------*/
/*******************************************************************************
* Function Name  : main
* Description    : Main program.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
extern void main_dhrystone( void );
int main(void)
{
#ifdef DEBUG
  debug();
#endif

  /* System Clocks Configuration */
  RCC_Configuration();

  /* NVIC Configuration */
  NVIC_Configuration();

  /* Enable GPIOB clock */
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);

  /* Configure PC.06, PC.07, PC.08 and PC.09 as output push-pull */
  GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_8 | GPIO_Pin_9;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_Init(GPIOB, &GPIO_InitStructure);

#warning SysTick configuration added
  SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK);
  SysTick_SetReload(0xFFFFFF);
  SysTick_CounterCmd(SysTick_Counter_Enable);
  SysTick_GetCounter();
  main_dhrystone();
}

/*******************************************************************************
* Function Name  : RCC_Configuration
* Description    : Configures the different system clocks.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void RCC_Configuration(void)
{
//#warning Add 2 Waitstates
//  /* 2 wait states required on the flash. */
//  *( ( vu32 * ) 0x40022000 ) = 0x02;

  /* RCC system reset(for debug purpose) */
  RCC_DeInit();

  /* Enable HSE */
  RCC_HSEConfig(RCC_HSE_ON);

  /* Wait till HSE is ready */
  while(RCC_GetFlagStatus(RCC_FLAG_HSERDY) == RESET)
  {
  }

  /* HCLK = SYSCLK */
  RCC_HCLKConfig(RCC_SYSCLK_Div1);
 
  /* PCLK2 = HCLK */
  RCC_PCLK2Config(RCC_HCLK_Div1);

  /* PCLK1 = HCLK */
  RCC_PCLK1Config(RCC_HCLK_Div1);

  /* Select HSE as system clock source */
  RCC_SYSCLKConfig(RCC_SYSCLKSource_HSE);

  /* Wait till HSE is used as system clock source */
  while(RCC_GetSYSCLKSource() != 0x04)
  {
  }
}

/*******************************************************************************
* Function Name  : NVIC_Configuration
* Description    : Configures Vector Table base location.
* Input          : None
* Output         : None
* Return         : None
*******************************************************************************/
void NVIC_Configuration(void)
{
#ifdef  VECT_TAB_RAM 
  /* Set the Vector Table base location at 0x20000000 */
  NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
#else  /* VECT_TAB_FLASH  */
  /* Set the Vector Table base location at 0x08000000 */
  NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);   
#endif
}

#ifdef  DEBUG
/*******************************************************************************
* Function Name  : assert_failed
* Description    : Reports the name of the source file and the source line number
*                  where the assert error has occurred.
* Input          : - file: pointer to the source file name
*                  - line: assert error line source number
* Output         : None
* Return         : None
*******************************************************************************/
void assert_failed(u8* file, u32 line)
{
  /* User can add his own implementation to report the file name and line number,
     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

  /* Infinite loop */
  while (1)
  {
  }
}
#endif

/*******************************************************************************
* Function Name  : Delay
* Description    : Inserts a delay time.
* Input          : nCount: specifies the delay time length.
* Output         : None
* Return         : None
*******************************************************************************/
void Delay(vu32 nCount)
{
  for(; nCount!= 0;nCount--);
}

/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/




Regards,
Frank

Offline

 

# 8   2008-10-20 08:03:50 How can I get the best STM32 performances?

khauer
Member
Registered: 2008-10-07
Posts: 17

Re: How can I get the best STM32 performances?

Hi Frank,

thanks until this point.

I found the fault in my code.

But what about the function main_dryhstone()??

Is it possible to post it too. Or where could I get that code.

I only hear about that benchmark code, but I never seen one before.

Thanks for help Klaus

Offline

 

# 9   2008-10-20 08:44:49 How can I get the best STM32 performances?

jrnore
New member
Registered: 2008-10-15
Posts: 5

Re: How can I get the best STM32 performances?

khauer :

Hi Frank,

thanks until this point.

I found the fault in my code.

Hi Klaus,

What fault are you talking about? BTW you said you wanted to compare my code with your code, that means that have ported dhrystone2 too? What score did you get?


khauer :

But what about the function main_dryhstone()??

Is it possible to post it too. Or where could I get that code.

I only hear about that benchmark code, but I never seen one before.

Thanks for help Klaus

The main_dhrystone is just the main function of dhrystone, which has been renammed into main_dhrystone.

Here is the code:
/*
This is a MODIFIED version of the Dhrystone 2.1 Benchmark program.

The only changes which have been made are:
1) the 'old-style' K&R function declarations have been replaced with
'ANSI-C-style' function declarations (in dhry_1.c and dhry_2,c), and
2) function prototypes have been added (in dhry.h)

These changes allow an ANSI-C compiler to produce more efficient code, with
no warnings.
*/

/*
****************************************************************************
*
*                   "DHRYSTONE" Benchmark Program
*                   -----------------------------
*
*  Version:    C, Version 2.1
*
*  File:       dhry_1.c (part 2 of 3)
*
*  Date:       May 25, 1988
*
*  Author:     Reinhold P. Weicker
*
****************************************************************************
*/

#include "dhry.h"
#include "util.h"

Rec_Pointer     Ptr_Glob,
                Next_Ptr_Glob;
int             Int_Glob;
Boolean         Bool_Glob;
char            Ch_1_Glob,
                Ch_2_Glob;
int             Arr_1_Glob [50];
int             Arr_2_Glob [50] [50];

#ifndef REG
        Boolean Reg = false;
#define REG
        /* REG becomes defined as empty */
        /* i.e. no register variables   */
#else
        Boolean Reg = true;
#endif

/* variables for time measurement: */

#ifdef TIMES
struct tms      time_info;
extern  int     times (void);
                /* see library function "times" */
#define Too_Small_Time (2*HZ)
                /* Measurements should last at least about 2 seconds */
#endif
#ifdef TIME
extern long     time(long *);
                /* see library function "time"  */
#define Too_Small_Time 2
                /* Measurements should last at least 2 seconds */
#endif
#ifdef MSC_CLOCK
extern clock_t clock(void);
#define Too_Small_Time (2*HZ)
#endif


//#define Too_Small_Time=100;

long            Begin_Time,
                End_Time,
                User_Time;


long            Microseconds,
                Dhrystones_Per_Second,
                Vax_Mips;

//float           Microseconds,
                //Dhrystones_Per_Second;

/* end of variables for time measurement */


Rec_Type next;
Rec_Type first;


unsigned char gstring[80];

long time(long *);

int main_dhrystone ( void ) //formerly main()
{
        One_Fifty       Int_1_Loc;
  REG   One_Fifty       Int_2_Loc;
        One_Fifty       Int_3_Loc;
  REG   char            Ch_Index;
        Enumeration     Enum_Loc;
        Str_30          Str_1_Loc;
        Str_30          Str_2_Loc;
  REG   int             Run_Index;
  REG   int             Number_Of_Runs;

  /* Initializations */
    SETUPTIMER();

//  Next_Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
    Next_Ptr_Glob = &next;
//  Ptr_Glob = (Rec_Pointer) malloc (sizeof (Rec_Type));
    Ptr_Glob = &first;

    Ptr_Glob->Ptr_Comp                    = Next_Ptr_Glob;
    Ptr_Glob->Discr                       = Ident_1;
    Ptr_Glob->variant.var_1.Enum_Comp     = Ident_3;
    Ptr_Glob->variant.var_1.Int_Comp      = 40;
    strcpy (Ptr_Glob->variant.var_1.Str_Comp,"DHRYSTONE PROGRAM, SOME STRING");
    strcpy (Str_1_Loc, "DHRYSTONE PROGRAM, 1'ST STRING");

    Arr_2_Glob [8][7] = 10;

/*    printf ("\n\r");
    printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n\r");
    printf ("\n\r");
    if(Reg)
    {
        printf ("Program compiled with 'register' attribute\n\r");
        printf ("\n\r");
    }
    else
    {
        printf ("Program compiled without 'register' attribute\n\r");
        printf ("\n\r");
    }*/


    Number_Of_Runs=2000;
    //Number_Of_Runs=2000000;
    //Number_Of_Runs=10;

    printf ("Execution starts, %d runs through Dhrystone\n\r", Number_Of_Runs);

  /***************/
  /* Start timer */
  /***************/


    GPIO_Write(GPIOB, GPIO_Pin_8);
    Begin_Time=READTIMER();

  for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index)
  {

    Proc_5();
    Proc_4();
      /* Ch_1_Glob == 'A', Ch_2_Glob == 'B', Bool_Glob == true */
    Int_1_Loc = 2;
    Int_2_Loc = 3;
    strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 2'ND STRING");
    Enum_Loc = Ident_2;
    Bool_Glob = ! Func_2 (Str_1_Loc, Str_2_Loc);
      /* Bool_Glob == 1 */
    while (Int_1_Loc < Int_2_Loc)  /* loop body executed once */
    {
      Int_3_Loc = 5 * Int_1_Loc - Int_2_Loc;
        /* Int_3_Loc == 7 */
      Proc_7 (Int_1_Loc, Int_2_Loc, &Int_3_Loc);
        /* Int_3_Loc == 7 */
      Int_1_Loc += 1;
    } /* while */
      /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
    Proc_8 (Arr_1_Glob, Arr_2_Glob, Int_1_Loc, Int_3_Loc);
      /* Int_Glob == 5 */
    Proc_1 (Ptr_Glob);
    for (Ch_Index = 'A'; Ch_Index <= Ch_2_Glob; ++Ch_Index)
                             /* loop body executed twice */
    {
      if (Enum_Loc == Func_1 (Ch_Index, 'C'))
          /* then, not executed */
        {
        Proc_6 (Ident_1, &Enum_Loc);
        strcpy (Str_2_Loc, "DHRYSTONE PROGRAM, 3'RD STRING");
        Int_2_Loc = Run_Index;
        Int_Glob = Run_Index;
        }
    }
      /* Int_1_Loc == 3, Int_2_Loc == 3, Int_3_Loc == 7 */
    Int_2_Loc = Int_2_Loc * Int_1_Loc;
    Int_1_Loc = Int_2_Loc / Int_3_Loc;
    Int_2_Loc = 7 * (Int_2_Loc - Int_3_Loc) - Int_1_Loc;
      /* Int_1_Loc == 1, Int_2_Loc == 13, Int_3_Loc == 7 */
    Proc_2 (&Int_1_Loc);
      /* Int_1_Loc == 5 */

  } /* loop "for Run_Index" */

  /**************/
  /* Stop timer */
  /**************/

    End_Time=READTIMER();

    GPIO_Write(GPIOB, GPIO_Pin_9);

  printf ("Execution ends\n\r");
  printf ("\n\r");
  printf ("Final values of the variables used in the benchmark:\n\r");
  printf ("\n\r");
  printf ("Int_Glob:            %d\n\r", Int_Glob);
  printf ("        should be:   %d\n\r", 5);
  printf ("Bool_Glob:           %d\n\r", Bool_Glob);
  printf ("        should be:   %d\n\r", 1);
  printf ("Ch_1_Glob:           %c\n\r", Ch_1_Glob);
  printf ("        should be:   %c\n\r", 'A');
  printf ("Ch_2_Glob:           %c\n\r", Ch_2_Glob);
  printf ("        should be:   %c\n\r", 'B');
  printf ("Arr_1_Glob[8]:       %d\n\r", Arr_1_Glob[8]);
  printf ("        should be:   %d\n\r", 7);
  printf ("Arr_2_Glob[8][7]:    %d\n\r", Arr_2_Glob[8][7]);
  printf ("        should be:   Number_Of_Runs + 10\n\r");
  printf ("Ptr_Glob->\n\r");
  printf ("  Ptr_Comp:          %d\n\r", (int) Ptr_Glob->Ptr_Comp);
  printf ("        should be:   (implementation-dependent)\n\r");
  printf ("  Discr:             %d\n\r", Ptr_Glob->Discr);
  printf ("        should be:   %d\n\r", 0);
  printf ("  Enum_Comp:         %d\n\r", Ptr_Glob->variant.var_1.Enum_Comp);
  printf ("        should be:   %d\n\r", 2);
  printf ("  Int_Comp:          %d\n\r", Ptr_Glob->variant.var_1.Int_Comp);
  printf ("        should be:   %d\n\r", 17);
  printf ("  Str_Comp:          %s\n\r", Ptr_Glob->variant.var_1.Str_Comp);
  printf ("        should be:   DHRYSTONE PROGRAM, SOME STRING\n\r");
  printf ("Next_Ptr_Glob->\n\r");
  printf ("  Ptr_Comp:          %d\n\r", (int) Next_Ptr_Glob->Ptr_Comp);
  printf ("        should be:   (implementation-dependent), same as above\n\r");
  printf ("  Discr:             %d\n\r", Next_Ptr_Glob->Discr);
  printf ("        should be:   %d\n\r", 0);
  printf ("  Enum_Comp:         %d\n\r", Next_Ptr_Glob->variant.var_1.Enum_Comp);
  printf ("        should be:   %d\n\r", 1);
  printf ("  Int_Comp:          %d\n\r", Next_Ptr_Glob->variant.var_1.Int_Comp);
  printf ("        should be:   %d\n\r", 18);
  printf ("  Str_Comp:          %s\n\r",
                                Next_Ptr_Glob->variant.var_1.Str_Comp);
  printf ("        should be:   DHRYSTONE PROGRAM, SOME STRING\n\r");
  printf ("Int_1_Loc:           %d\n\r", Int_1_Loc);
  printf ("        should be:   %d\n\r", 5);
  printf ("Int_2_Loc:           %d\n\r", Int_2_Loc);
  printf ("        should be:   %d\n\r", 13);
  printf ("Int_3_Loc:           %d\n\r", Int_3_Loc);
  printf ("        should be:   %d\n\r", 7);
  printf ("Enum_Loc:            %d\n\r", Enum_Loc);
  printf ("        should be:   %d\n\r", 1);
  printf ("Str_1_Loc:           %s\n\r", Str_1_Loc);
  printf ("        should be:   DHRYSTONE PROGRAM, 1'ST STRING\n\r");
  printf ("Str_2_Loc:           %s\n\r", Str_2_Loc);
  printf ("        should be:   DHRYSTONE PROGRAM, 2'ND STRING\n\r");
  printf ("\n\r");

  //User_Time = (End_Time - Begin_Time)*(BSP_FOSC0/1000.0);
  User_Time = -(End_Time - Begin_Time);


/**/ if (User_Time==0) User_Time=13; /*No counter timer*/

    printf("Cycles %d\n\r",User_Time);
    printf("Number_Of_Runs %d\n\r",Number_Of_Runs);
    printf("Cycles per run %d\n\r",User_Time/Number_Of_Runs);
    {
    double vax_mips_rating = ((double)Number_Of_Runs)/(0.001757*(double)User_Time);
    printf("Vax MIPS/MHz rating: %f\n\r", vax_mips_rating);
    }

    return 0;
}


void Proc_1 (REG Rec_Pointer Ptr_Val_Par)
/******************/
    /* executed once */
{
  REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
                                        /* == Ptr_Glob_Next */
  /* Local variable, initialized with Ptr_Val_Par->Ptr_Comp,    */
  /* corresponds to "rename" in Ada, "with" in Pascal           */

  structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
  Ptr_Val_Par->variant.var_1.Int_Comp = 5;
  Next_Record->variant.var_1.Int_Comp
        = Ptr_Val_Par->variant.var_1.Int_Comp;
  Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
  Proc_3 (&Next_Record->Ptr_Comp);
    /* Ptr_Val_Par->Ptr_Comp->Ptr_Comp
                        == Ptr_Glob->Ptr_Comp */
  if (Next_Record->Discr == Ident_1)
    /* then, executed */
  {
    Next_Record->variant.var_1.Int_Comp = 6;
    Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp,
           &Next_Record->variant.var_1.Enum_Comp);
    Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
    Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
           &Next_Record->variant.var_1.Int_Comp);
  }
  else /* not executed */
    structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
} /* Proc_1 */


void Proc_2 (One_Fifty *Int_Par_Ref)
/******************/
    /* executed once */
    /* *Int_Par_Ref == 1, becomes 4 */
{
  One_Fifty  Int_Loc;
  Enumeration   Enum_Loc;

  Int_Loc = *Int_Par_Ref + 10;
  do /* executed once */
    if (Ch_1_Glob == 'A')
      /* then, executed */
    {
      Int_Loc -= 1;
      *Int_Par_Ref = Int_Loc - Int_Glob;
      Enum_Loc = Ident_1;
    } /* if */
  while (Enum_Loc != Ident_1); /* true */
} /* Proc_2 */


void Proc_3 (Rec_Pointer *Ptr_Ref_Par)
/******************/
    /* executed once */
    /* Ptr_Ref_Par becomes Ptr_Glob */
{
  if (Ptr_Glob != Null)
    /* then, executed */
    *Ptr_Ref_Par = Ptr_Glob->Ptr_Comp;
  Proc_7 (10, Int_Glob, &Ptr_Glob->variant.var_1.Int_Comp);
} /* Proc_3 */


void Proc_4 (void) /* without parameters */
/*******/
    /* executed once */
{
  Boolean Bool_Loc;

  Bool_Loc = Ch_1_Glob == 'A';
  Bool_Glob = Bool_Loc | Bool_Glob;
  Ch_2_Glob = 'B';
} /* Proc_4 */


void Proc_5 (void) /* without parameters */
/*******/
    /* executed once */
{
  Ch_1_Glob = 'A';
  Bool_Glob = false;
} /* Proc_5 */


        /* Procedure for the assignment of structures,          */
        /* if the C compiler doesn't support this feature       */
#ifdef  NOSTRUCTASSIGN
memcpy (d, s, l)
register char   *d;
register char   *s;
register int    l;
{
        while (l--) *d++ = *s++;
}
#endif

Offline

 

# 10   2008-10-20 09:35:07 How can I get the best STM32 performances?

khauer
Member
Registered: 2008-10-07
Posts: 17

Re: How can I get the best STM32 performances?

Hi Frank,

I tried benchmarking with a trivilar program. I found a mistake in the Initialisation.

Now I try to integrate Dhrystone. I will post my first results.

regards klaus

Last edited by khauer (2008-10-20 09:35:43)

Offline

 

# 11   2008-10-20 10:05:28 How can I get the best STM32 performances?

khauer
Member
Registered: 2008-10-07
Posts: 17

Re: How can I get the best STM32 performances?

I`m very sorry. But could you send the Header-files to my email address to include them:

Thanks a lot.

Offline

 

# 12   2008-10-22 06:28:16 How can I get the best STM32 performances?

khauer
Member
Registered: 2008-10-07
Posts: 17

Re: How can I get the best STM32 performances?

Hi Frank,

You could send it to profdrhauer@gmx.de

thanks

Offline

 

# 13   2008-10-23 06:50:12 How can I get the best STM32 performances?

khauer
Member
Registered: 2008-10-07
Posts: 17

Re: How can I get the best STM32 performances?

Hello Frank,

I think I`m a little bit stupid today.

I got your package and opened it in Ride7. I pushed "Make" and taste it with the debugger and primer. It works.

But how could I get the output or see how many DMIPS/MHz are used?

Thanks and best regards Klaus

Offline

 

# 14   2008-11-10 12:46:13 How can I get the best STM32 performances?

coconnor55
New member
Registered: 2008-11-08
Posts: 6

Re: How can I get the best STM32 performances?

My experience with this is about 2 days old but I wondered if you turned off the debug output in the build?  Does that have any impact?

Offline

 

Board footer