cancel
Showing results for 
Search instead for 
Did you mean: 

System Clock Frequency SPC58

Posted on June 27, 2017 at 14:18

Hi,

Just started working at a new place and we are using a STC58NE84xx. It's a new part for me, I've never used a micro-controller as complex as this. Very simple: I'm trying to verify the system clock frequency. I think the maximum that it can configured for is 180 MHz. I've been reading many of the documents regarding the PLLs, etc but as you know ... it's pretty complicated. I'm thinking I'd like to get the clock to an external pin so that I can look at it on the scope. It seems like that may be possible. Or, is there a HAL function that will just figure out the state of all the configuration registers and return the system clock frequency? Any help would be appreciated. Thanks in advance.

#system-clock #oscillator #spc58
1 ACCEPTED SOLUTION

Accepted Solutions
Erwan YVIN
ST Employee
Posted on June 28, 2017 at 10:30

Hello Mike ,

on SPC5Studio 5.4.0 (HAL & RLA), Officially , we do not support 

SPC58NE84xx

Anyway , there is some components drafts located in : (not tested in our current release)

https://github.com/microwan/spc5-hal

 

  Best regards

                Erwan

View solution in original post

4 REPLIES 4
Erwan YVIN
ST Employee
Posted on June 28, 2017 at 10:30

Hello Mike ,

on SPC5Studio 5.4.0 (HAL & RLA), Officially , we do not support 

SPC58NE84xx

Anyway , there is some components drafts located in : (not tested in our current release)

https://github.com/microwan/spc5-hal

 

  Best regards

                Erwan

Posted on June 28, 2017 at 22:03

Thanks Erwan,

I don't really know about GitHub so I'll have to spend some time poking around in there. Do I have to sign up for an account to get that code out? Well, I'll figure it out. I did some testing to try to figure out the clock speed indirectly I executed a bunch of NOPs and toggled a GPIO and (after I subtracted the overhead) figured that each NOP takes about 18ns. I looked to see how many clock cycles a NOP (which is really an OR 0,0,0) should take but I have not been able to find that. I found a huge listing of assembly instructions but no mention of how long each instruction takes.

I'll keep researching this.

Mike

Posted on June 29, 2017 at 11:35

Hello Mike ,

for github, you should have git for windows to download the code

Anyway , spc5-hal is providing a set of api for that

osalThreadSleepMilliseconds(100);�?

Warning , at the current time , it is not maintained

Best regards

Erwan

Posted on June 29, 2017 at 20:52

Erwan

Huh? That looks like some type of operating system call. How will that help me?

If I want PLL0 to be 400 MHz and PLL1 to be 180 MHz and my input clock is 20 MHz what should the settings be for the PLLDIG registers?

Mike