cancel
Showing results for 
Search instead for 
Did you mean: 

Change XOSC speed and settings

aurelien23
Senior
Posted on September 03, 2014 at 16:46

Hello,

on SPC56EL60, I'm using an external 16MHz XTAL so I changed the ''XOSC Clock'' value in the configuration (default is 40MHz). I'm getting the error:

''SPC5_FMPLL0_VCO_CLK outside acceptable range (SPC5_FMPLLVCO_MIN...SPC5_FMPLLVCO_MAX)''

To solve this I have to modify SPC5_FMPLL0_IDF_VALUE and SPC5_FMPLL0_NDIV_VALUE value's that are used to calculate SPC5_FMPLL0_VCO_CLK.

These defines are code generated and I can't find them in the application config. Can you please explain how the setup the clock peripheral and keep the overide values unchanged while regenerating code?

Thank you
This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Erwan YVIN
ST Employee
Posted on September 05, 2014 at 10:33

Hello Aurélien ,

Sorry for my late answer,

at the current time, it is not possible to configure IDF_VALUE and NDIV  in your SPC56ELxx HAL Drivers Component version by  GUI.

there is a change request about that to add this extended settings

and the group is set to FALSE:

(cf below from plugin.xml)

org.chibios.spc5.components.hal.platform.spc56elxx

<property

                           brief=''FMPLL0 Input Divider Value.''

                           default=''1''

                           editable=''true''

                           max=''15''

                           min=''1''

                           name=''IDF Value''

                           required=''true''

                           type=''unsigned''>

</property>

<property

                           brief=''FMPLL0 Multiplier Value.''

                           default=''32''

                           editable=''true''

                           max=''96''

                           min=''32''

                           name=''NDIV Value''

                           required=''true''

                           type=''unsigned''>

 </property>

#define SPC5_FMPLL0_IDF_VALUE               ${conf.instance.initialization_settings.fmpll0_settings.idf_value.value[0]} with your defined value

#define SPC5_FMPLL0_NDIV_VALUE              ${conf.instance.initialization_settings.fmpll0_settings.ndiv_value.value[0]} with defined value

in waiting for new HAL Drivers with extended settings, i advice you to update this file plugin.xml in your SPC5Studio.

KEEP THE ORIGINAL ONE

or use some tips like #undef / #define in your application.

    Best regards

                 Erwan