2018-03-07 07:13 AM
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 errorswork around is to comment out
// htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
When is the next mxCube update due ?
2018-03-07 08:30 AM
Hello
Curran.Danny
,I cannot reproduce this issue using CubeMx 4.24 and STM32CubeF3 v1.9.0.
May be you need to review ifyour project includes the right files and defines symbols.
Please share your ioc file to check this issue.
Best Regards
Imen
2018-03-07 09:28 AM
I have added the *.ioc file that produces the code
________________ Attachments : OBDII2.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HxqH&d=%2Fa%2F0X0000000b2D%2FAzUlq4wQAAYxyuPgjLgfUCDgPvflrlMnVnm7mYecyWY&asPdf=false2018-03-09 01:05 AM
I have just checked on Cube and its up to date
the MxCube version is 4.24.0
using Manage Embedded Software packages 1.9 has been downloaded etc
TM32CubeF3 Firmware Package V1.9.0 / 23-June-2017
Main ChangesMaintenance release.2018-03-09 01:06 AM
2018-03-09 01:53 AM
Hello
Curran.Danny
,It seems you are using old CubeF3 firmware package!
Please download and check with the latest version
STM32CubeF3 v1.9.0, then keep me informed about your result.
Kind Regards
Imen
2018-03-09 02:04 AM
Does this mean you cant use an old cube project with a newer version of the Firmware libraries automatically ?
e.g. the firmware lib is not automatically updated to use the latest version. ?
I have done as suggested and Cube produces different code
taken from the ioc file I can now see the following
ProjectManager.CustomerFirmwarePackage=C\:\\Users\\dcurran\\STM32Cube\\Repository\\STM32Cube_FW_F3_V1.9.0
ProjectManager.FirmwarePackage=STM32Cube FW_F3 V1.4.0I can also see new *.h files
Can I suggest to your dev team that they make the user more aware that a old firmware package is in the ioc file
as I had all the previous versions of the F3 lib and it wasn't until I removed all previous firmware libs that cube indicated there was an option
2018-03-09 02:31 AM
When I open your ioc file and Project settings, I see you are using the firmware version
STM32Cube_FW_F3_V1.4.0.
Please check In your Project Settings menu that the firmware package version used is STM32Cube_FW_F3_V1.9.0, Otherwise, you should update the firmware location to use the latest version.
Best Regards,
Imen
2018-03-09 06:54 AM
Hi
Curran.Danny
,It's recommended to use latest version of Cube firmware package and CubeMx tool as there is always enhancement and bugsfixes in the new release.
STM32CubeMX can check if there is a
new library package installation or updates
for new STM32CubeMX tool version.For that, in the Help > Updater Settings tab, you shouldenable the Automatic check for updates.
In the Project Tab, there isa Use Default Firmware Location
checkbox
(which is specified under the Menu Help > Updater settings)specifying
thepath forthe
installed firmware packages version and by default, the latest available version is used for the project.I recommend you check the user Manual
''STM32CubeMx for STM32 configuration and initialization C code generation'' for more details.Kind Regards,
Imen