cancel
Showing results for 
Search instead for 
Did you mean: 

SPC574S64 Crystal Confuguration

VP.6
Associate II

Hi

I am working on SPC574S64 Controller, A20MHz Crystal is used in our board

I tried to configure it in the SPC5Studio

I tried using one of the example code for the configuration where a 40MHz is used in the configuration and I tried to change to 20MHz, but could not succeed

I tried modifying the dependent registers, but still nothing worked out.

It is showing an error as below


_legacyfs_online_stmicro_images_0693W00000bi2xqQAA.pngI could see the ranges are as below for them

I tried changing the PLL0 Settings but nothing gave me the positive result

Could you kindly suggest settings for a 20MHz crystal

1 ACCEPTED SOLUTION

Accepted Solutions
ODOUV.1
ST Employee

It seems the clock MIN values are too high.

Meanwhile we are cross-checking the MIN/MAX values, here is a temporary workarround to allow you to configure with ext-clock at 20 MHz :

open plugin.xml in directory :

C:\SPC5Studio-6.0\eclipse\plugins\com.st.spc5.components.clock.spc574sxx_rla_1.18.0.20221220104643(you could have a different version)

modify min values for:

brief="PLL1-IN clock point."

and

brief="PLL1-VCO clock point."

and save plugin.xml

then restart SPC5Studio in terminal with clean option:

$ ./SPC5Studio.exe -clean

then after code generation, you will have to patch in:

components/spc574sxx_clock_component_rla/lib/include/clock.h

-#define SPC5_PLL1VCO_MIN          600000000U

+#define SPC5_PLL1VCO_MIN          20000000U

Best Regards.

View solution in original post

4 REPLIES 4
ODOUV.1
ST Employee

It seems the clock MIN values are too high.

Meanwhile we are cross-checking the MIN/MAX values, here is a temporary workarround to allow you to configure with ext-clock at 20 MHz :

open plugin.xml in directory :

C:\SPC5Studio-6.0\eclipse\plugins\com.st.spc5.components.clock.spc574sxx_rla_1.18.0.20221220104643(you could have a different version)

modify min values for:

brief="PLL1-IN clock point."

and

brief="PLL1-VCO clock point."

and save plugin.xml

then restart SPC5Studio in terminal with clean option:

$ ./SPC5Studio.exe -clean

then after code generation, you will have to patch in:

components/spc574sxx_clock_component_rla/lib/include/clock.h

-#define SPC5_PLL1VCO_MIN          600000000U

+#define SPC5_PLL1VCO_MIN          20000000U

Best Regards.

Thank you very much for your response. I tried the suggestions and was able to generate the code and build it. I am using the PIT Timer application example from SPC5 Studio and Here is the Crystal configuration Settings and Timer settings below.


_legacyfs_online_stmicro_images_0693W00000bi9f4QAA.pngand


_legacyfs_online_stmicro_images_0693W00000bi9fEQAQ.png

PIT Settings


_legacyfs_online_stmicro_images_0693W00000bi9fsQAA.png 


_legacyfs_online_stmicro_images_0693W00000bi9g2QAA.png 

The Issue I observed is that the Timer 1,2,3 are configured at 250Hz, 500Hz and 1000Hz, but when I flashed in the debugger and observed the Timer 1,2,3 response is 1ms, 500us and 250us correspondingly. Is there any thing need to be modified in Crystal settings? Kindly Suggest

VP.6
Associate II

Also I am seeing this warning in the debugger window UTESTK


_legacyfs_online_stmicro_images_0693W00000bi9gbQAA.pngThis is the Target Interface setting.


_legacyfs_online_stmicro_images_0693W00000bi9ggQAA.png 

Kindly suggest if there is any change need to be done in the debugger

I have no clue on Studio Tool side about your new issues.

In order to maximize your chance to have support, I would suggest you to enter one question for each problems (keeping this one for Studio minimum clock issue).

Best Regards.