2017-06-27 05:18 AM
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 #spc58Solved! Go to Solution.
2017-06-28 01:30 AM
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
2017-06-28 01:30 AM
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
2017-06-28 01:03 PM
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
2017-06-29 04:35 AM
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
2017-06-29 01:52 PM
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