AnsweredAssumed Answered

MXCube F302 timer driver will not compile from generation

Question asked by curran.danny on Mar 7, 2018
Latest reply on Mar 9, 2018 by Imen D

using mxCube 4.24.0

Keil 5.25.0.0

 

using timer             :6 

prescalar                :64

Counter                  :up

Counter period      65535

autoload preload  : disable 

 

Cube produces 

void MX_TIM6_Init(void)
{
  TIM_MasterConfigTypeDef sMasterConfig;
  htim6.Instance = TIM6;
  htim6.Init.Prescaler = 64;
  htim6.Init.CounterMode = TIM_COUNTERMODE_UP;
  htim6.Init.Period = 65535;
  htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;

 

This line causes the error 
  htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
from Keil IDE 
../Src/tim.c(58): error:  #136: struct "<unnamed>"  has no field "AutoReloadPreload"
    htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
../Src/tim.c(58): error:  #20: identifier "TIM_AUTORELOAD_PRELOAD_DISABLE" is undefined
    htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
../Src/tim.c: 0 warnings, 2 errors
work around is to comment out 
//  htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
When is the next mxCube update due ?

Outcomes